Results 1 to 4 of 4

Thread: Problem clearing grid store

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    32

    Default Problem clearing grid store

    i have Problem reloding the grid data. If no records are selected the reloding is working perfect, but if i select some record from grid and than try to relode the grid, i am getting the folowing exception ?



    com.google.gwt.event.shared.UmbrellaException: Exception caught: Exception caught: Index: 0, Size: 0
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.clear(ListStore.java:182)

    this is the code:

    mainView.getMappingGrid().getGrid().getStore().clear();
    mainView.getMappingGrid().getGrid().getStore().addAll(result);

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737

    Default

    Instead of clear(), addAll(...), use .replaceAll, it is specially designed for this purpose to minimize other events that go off.

    The exception you pasted is an umbrella exception, which means it wraps one or more other exceptions, please share the complete stack trace, as well as the code that causes it to happen. Please follow the bug template (http://www.sencha.com/forum/showthread.php?194224) to make sure we get enough details to understand the full issue.
    Apparently my sencha forum inbox is too small to hold my messages, please contact me at [email protected] to reach me.

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    32

    Default

    Quote Originally Posted by Colin Alworth View Post
    Instead of clear(), addAll(...), use .replaceAll, it is specially designed for this purpose to minimize other events that go off.

    The exception you pasted is an umbrella exception, which means it wraps one or more other exceptions, please share the complete stack trace, as well as the code that causes it to happen. Please follow the bug template (http://www.sencha.com/forum/showthread.php?194224) to make sure we get enough details to understand the full issue.
    with replaceAll all i get the same error, i also tryed to clear the store manuly with store.remove(..) but that didn't also work. Hier is the full stack trace:

    09:12:44.202 [ERROR] [vacationtracking] Uncaught exception escaped
    com.google.gwt.event.shared.UmbrellaException: Exception caught: Exception caught: Exception caught: Index: 0, Size: 0
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:55)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:1)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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:679)
    Caused by: com.google.gwt.event.shared.UmbrellaException: Exception caught: Exception caught: Index: 0, Size: 0
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
    at com.sencha.gxt.widget.core.client.Component.fireEvent(Component.java:293)
    at com.sencha.gxt.widget.core.client.grid.GridView.refresh(GridView.java:878)
    at com.sencha.gxt.widget.core.client.grid.GridView.onDataChanged(GridView.java:2278)
    at com.sencha.gxt.widget.core.client.grid.GridView$10.onDataChange(GridView.java:1993)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:105)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:55)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:1)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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:679)
    Caused by: com.google.gwt.event.shared.UmbrellaException: Exception caught: Index: 0, Size: 0
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel.fireEvent(AbstractStoreSelectionModel.java:219)
    at com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel.fireSelectionChange(AbstractStoreSelectionModel.java:471)
    at com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel.refresh(AbstractStoreSelectionModel.java:279)
    at com.sencha.gxt.widget.core.client.grid.GridSelectionModel$Handler.onRefresh(GridSelectionModel.java:74)
    at com.sencha.gxt.widget.core.client.event.RefreshEvent.dispatch(RefreshEvent.java:48)
    at com.sencha.gxt.widget.core.client.event.RefreshEvent.dispatch(RefreshEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
    at com.sencha.gxt.widget.core.client.Component.fireEvent(Component.java:293)
    at com.sencha.gxt.widget.core.client.grid.GridView.refresh(GridView.java:878)
    at com.sencha.gxt.widget.core.client.grid.GridView.onDataChanged(GridView.java:2278)
    at com.sencha.gxt.widget.core.client.grid.GridView$10.onDataChange(GridView.java:1993)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:105)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:55)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:1)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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:679)
    Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:571)
    at java.util.ArrayList.get(ArrayList.java:349)
    at com.artech.client.gui.statistics.MappingGrid$6.onSelectionChanged(MappingGrid.java:175)
    at com.sencha.gxt.widget.core.client.selection.SelectionChangedEvent.dispatch(SelectionChangedEvent.java:96)
    at com.sencha.gxt.widget.core.client.selection.SelectionChangedEvent.dispatch(SelectionChangedEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel.fireEvent(AbstractStoreSelectionModel.java:219)
    at com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel.fireSelectionChange(AbstractStoreSelectionModel.java:471)
    at com.sencha.gxt.widget.core.client.selection.AbstractStoreSelectionModel.refresh(AbstractStoreSelectionModel.java:279)
    at com.sencha.gxt.widget.core.client.grid.GridSelectionModel$Handler.onRefresh(GridSelectionModel.java:74)
    at com.sencha.gxt.widget.core.client.event.RefreshEvent.dispatch(RefreshEvent.java:48)
    at com.sencha.gxt.widget.core.client.event.RefreshEvent.dispatch(RefreshEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
    at com.sencha.gxt.widget.core.client.Component.fireEvent(Component.java:293)
    at com.sencha.gxt.widget.core.client.grid.GridView.refresh(GridView.java:878)
    at com.sencha.gxt.widget.core.client.grid.GridView.onDataChanged(GridView.java:2278)
    at com.sencha.gxt.widget.core.client.grid.GridView$10.onDataChange(GridView.java:1993)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:105)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:55)
    at com.artech.client.gui.statistics.StatisticsController$2.onSuccess(StatisticsController.java:1)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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:679)

  4. #4
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737

    Default

    This is the real error:
    Code:
    Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:571)
        at java.util.ArrayList.get(ArrayList.java:349)
        at com.artech.client.gui.statistics.MappingGrid$6.onSelectionChanged(MappingGrid.java:175)
        at
    Look at your code there, something is probably wrong in your own class.

    If no, please follow the bug template - a test case, which version of GXT, how to reproduce, etc.
    Apparently my sencha forum inbox is too small to hold my messages, please contact me at [email protected] to reach me.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •