I have created a GWT DataGrid (which essentially acts like a celltable) and am getting a very strange error.
java.lang.IllegalStateException: A possible infinite loop has been detected in a Cell
Widget. This usually happens when your SelectionModel triggers a SelectionChangeEvent
when SelectionModel.isSelected() is called, which causes the table to redraw continuously.
I have found very little information of this error while searching the net, and it does not impact the front end at all, in fact, it works perfectly. Yet it still errors in eclipse when specific scenarios occur.
How to reproduce error:
-Selecting specific filters (cannot identify why it does not consistently error for every column filter)
-selecting a cell that contains data hidden with (...) and then keying left or right keyboard arrow. CSS works so when user hovers over cell, the row height expands and all text is shown.)
what causes/ fixes the error:
The error seems to come from the line of code:
myDataTable.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELCTION);
when i comment this line out the errors no longer occur. Problem is the functionality then is not desired as the keyboard selection is separate from mouse selection and the whole "3 active state" issue exists.
About my code:
I am using:
-SingleSelectionModel
-DoubleClick DOM handler
-SelectionChangeEvent.Handler (error still shows even if this is commented out)
Updated Further information:
when I follow through in debugger it just keeps calling onSelectionChange like 5 times and then errors out. Then, like I said, if i remove the SelectionChange handler it will not hit any breakpoints in my file, but does again go to the GWT file HasDataPresenter.Class and continue to run until it eventually errors there(loop style).
Furthermore if i first select a cell that does not have the ellipsis (...) and arrow over one that does have it, i do not receive the error. It is only when i initially select a cell with the (...) and arrow out, that it will error.