Announcement

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

    [BUG] Error while accessing hidden FormItem after the Form is drawn

    Hello,

    with the 3.1p 2013/01/28 LGPL I get an error, if I try to access a hidden FormItem after the Form is drawn. Here is the TestCase:
    Code:
            DataSource ds = new DataSource();
            DataSourceField foo = new DataSourceField("foo", FieldType.TEXT);
            foo.setHidden(true);
            ds.setFields(foo);
    
            final DynamicForm form = new DynamicForm();
            form.setDataSource(ds);
            form.setUseAllDataSourceFields(true);
            form.setFields(new FormItem("foo"));
            System.out.println(form.getField("foo")); // WORKS
            form.draw();
            System.out.println(form.getField("foo")); // ERROR
    and here is the error from the GWT-Console:

    Code:
     	com.google.gwt.core.client.JavaScriptException: (TypeError): self is null
     	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
     	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
     	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
     	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:184)
     	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
     	at com.smartgwt.client.widgets.form.fields.FormItem.isCreated(FormItem.java)
     	at com.smartgwt.client.widgets.form.fields.FormItem.getAttributeAsString(FormItem.java:4226)
     	at com.smartgwt.client.widgets.form.fields.FormItem.getName(FormItem.java:4389)
     	at com.smartgwt.client.widgets.form.DynamicForm.getField(DynamicForm.java:3286)
    ....
    regards Andreas
    Last edited by andy.2003; 30 Jan 2013, 00:30. Reason: Format Exception

    #2
    I have the same situation.
    Have you found a solution?

    Comment


      #3
      We've made a change to 3.1p and 4.0d that should address this - please retest with a build dated April 28 or later

      Comment


        #4
        In fact, this fix introduced a regression which has now been fixed, so please retry with a build dated April 30 or later

        Comment

        Working...
        X