1
我正在使用GWT Datagrid。我最初將網格與過濾的數據綁定在一起。點擊每行的特定列,我們可以搜索其相關元素。因此,我正在使用DataProvider使用與單擊元素相關的新數據更新網格。當行數少於四時,我得到一個超出綁定異常的索引。唯一的例外如下:當我嘗試用少於四行更新它時,GWT Datagrid拋出索引超出綁定異常
java.lang.IndexOutOfBoundsException: toIndex = 54
at java.util.ArrayList.subListRangeCheck(ArrayList.java:922)
at java.util.ArrayList.subList(ArrayList.java:914)
at com.google.gwt.user.cellview.client.HasDataPresenter.resolvePendingState(HasDataPresenter.java:1370)
at com.google.gwt.user.cellview.client.HasDataPresenter.resolvePendingState(HasDataPresenter.java:1295)
at com.google.gwt.user.cellview.client.HasDataPresenter.access$3(HasDataPresenter.java:1062)
at com.google.gwt.user.cellview.client.HasDataPresenter$2.execute(HasDataPresenter.java:984)
at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:228)
at com.google.gwt.core.client.impl.SchedulerImpl.flushFinallyCommands(SchedulerImpl.java:327)
at com.google.gwt.core.client.impl.Impl.exit(Impl.java:266)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:257)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)
Please help me with this problem.
Tiago Neves | 1 Feb 13:16 2011 Picon Gravatar 回覆:SEVERE:Cell Widget試圖在渲染循環中渲染自己 我解決了我的問題。在我的情況下,有時日期是空的,然後會拋出一個異常。看起來,如果在渲染過程中拋出任何異常,則拋出此消息(異常),掩蓋原始異常。 –