Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    IllegalStateException in ListGrid complaining that the widget not yet built

    Version: v9.0p_2013-10-30/PowerEdition Deployment 2013-10-30
    Browser: Firefox 24.0

    After a version upgrade, we're experiencing a problem within ListGrid. The problem shows itself blatently in development mode though I feel that it's also causing problems in tomcat.

    The earlier version I'll be refering to is: v8.3p_2013-09-26/PowerEdition Deployment 2013-09-26

    In the earlier version we were able to do the following:

    Given a ListGrid by the name of "grid" and a RecordList by the name of "records", we would do this:

    grid.setData(records)
    .
    .
    .
    ListGridRecord[] gridRecords = grid.getRecords()

    With the newer build, the getRecords() call ends in the following:
    Code:
    java.lang.IllegalStateException: Cannot access property groupTree before the widget has been created.
        at com.smartgwt.client.widgets.BaseWidget.errorIfNotCreated(BaseWidget.java:703)
        at com.smartgwt.client.widgets.grid.ListGrid.getGroupTree(ListGrid.java:5340)
        at com.smartgwt.client.widgets.grid.ListGrid.isGrouped(ListGrid.java:15045)
        at com.smartgwt.client.widgets.grid.ListGrid.getRecords(ListGrid.java:15032)
        at com.islandpacific.gui.client.PoPackContentsListLayout.setData(PoPackContentsListLayout.java:589)
        at com.islandpacific.gui.client.PoPackContentsListLayout.<init>(PoPackContentsListLayout.java:66)
        at com.islandpacific.gui.client.PoItemEditor.setAssortmentCanvasLayout(PoItemEditor.java:2900)
        at com.islandpacific.gui.client.PoItemEditor.setAssortmentCanvas(PoItemEditor.java:2673)
        at com.islandpacific.gui.client.PoItemEditor.customizePoItemEditForms(PoItemEditor.java:5023)
        at com.islandpacific.gui.client.PoItemEditor.access$27(PoItemEditor.java:4780)
        at com.islandpacific.gui.client.PoItemEditor$10.execute(PoItemEditor.java:989)
        at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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.invokeNativeVoid(ModuleSpace.java:299)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.google.gwt.user.client.Window.alert(Window.java)
        at com.smartgwt.client.SmartGwtEntryPoint$1.onUncaughtException(SmartGwtEntryPoint.java:354)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:244)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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:662)
    I find that doing a simple grid.getRecord(0) before the getRecords() call creates the grid and gets us past the problem.

    Should this be happening?
    Since getting a single record using getRecord() takes care of creating the grid, shouldn't the getRecords() method do the same?

    This all boils down to the fact that getRecords() calls isGrouped(), which in turn calls getGroupTree()

    However the getGroupTree logic has changed.

    What used to be this:

    Code:
        public Tree getGroupTree() {
            return Tree.getOrCreateRef(getAttributeAsJavaScriptObject("groupTree"));
        }
    Is now this:

    Code:
        public Tree getGroupTree() throws IllegalStateException {
            errorIfNotCreated("groupTree");
            return Tree.getOrCreateRef(getAttributeAsJavaScriptObject("groupTree"));
        }
    Thanks,
    Larry

    #2
    Still an issue, any response?

    Comment


      #3
      This has been fixed in SGWT 4.0p, 4.1p, and 5.0p, and the changes will be in the next nightly builds. (It will take a bit longer for the issue to be resolved in SGWT 5.1d, as we're taking a different approach.)

      Comment

      Working...
      X