GXT: RadioGroup exception

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

GXT: RadioGroup exception

Postby gaspo » Sat Oct 24, 2009 2:27 am

When I add RadioGroup to a form and then drop Radio field onto it I get NullPointer exception:
I run the latest WindowBuilder Pro 7.2 and get the same exception on both Windows and Linux.

Code: Select all
java.lang.NullPointerException
at com.instantiations.designer.core.model.description.helpers.ComponentDescriptionHelper.ensureInitialized(ComponentDescriptionHelper.java:518)
at com.instantiations.designer.core.model.association.InvocationChildAssociation.createAssociationSubProperties(InvocationChildAssociation.java:155)
at com.instantiations.designer.core.model.association.InvocationChildAssociation.getAssociationProperty(InvocationChildAssociation.java:132)
at com.instantiations.designer.core.model.association.InvocationChildAssociation.addProperties(InvocationChildAssociation.java:118)
at com.instantiations.designer.core.model.JavaInfo.getPropertyList(JavaInfo.java:491)
at com.instantiations.designer.gwt.model.widgets.UIObject_Info.getPropertyList(UIObject_Info.java:163)
at com.instantiations.designer.core.model.JavaInfo.getProperties(JavaInfo.java:443)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage.getProperties(ComponentsPropertiesPage.java:652)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage.getAllProperties(ComponentsPropertiesPage.java:639)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage.showProperties(ComponentsPropertiesPage.java:570)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage.access$1700(ComponentsPropertiesPage.java:55)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage$12.run(ComponentsPropertiesPage.java:538)
at com.instantiations.designer.core.utils.execution.ExecutionUtils.runLog(ExecutionUtils.java:52)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage.refreshProperties(ComponentsPropertiesPage.java:533)
at com.instantiations.designer.core.editor.structure.property.ComponentsPropertiesPage.setSelection(ComponentsPropertiesPage.java:254)
at com.instantiations.designer.core.editor.structure.DesignComponentsComposite$1.selectionChanged(DesignComponentsComposite.java:60)
at com.instantiations.designer.core.utils.gef.EditPartsSelectionProvider.fireSelectionChanged(EditPartsSelectionProvider.java:94)
at com.instantiations.designer.core.utils.gef.EditPartsSelectionProvider.access$000(EditPartsSelectionProvider.java:24)
at com.instantiations.designer.core.utils.gef.EditPartsSelectionProvider$1.selectionChanged(EditPartsSelectionProvider.java:29)
at com.instantiations.gef.core.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:163)
at com.instantiations.gef.core.AbstractEditPartViewer.setSelection(AbstractEditPartViewer.java:221)
at com.instantiations.gef.core.AbstractEditPartViewer.setSelection(AbstractEditPartViewer.java:155)
at com.instantiations.gef.tree.TreeViewer$1.widgetSelected(TreeViewer.java:148)
at com.instantiations.gef.tree.TreeViewer$1.widgetDefaultSelected(TreeViewer.java:154)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:113)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
gaspo
 
Posts: 21
Joined: Thu Oct 08, 2009 11:28 pm

Re: GXT: RadioGroup exception

Postby Eric Clayberg » Sat Oct 24, 2009 8:08 am

Give this a try using the latest GWT Designer v7.2 build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GXT: RadioGroup exception

Postby gaspo » Sun Oct 25, 2009 4:05 am

Thank you for the quick update.
I do not get exception anymore after dropping Radio filed onto RadioGroup.
However, after I add a Radio into RadioGroup it still shows text "Empty MultiField" in front of Radio I added. I can make "Empty MultiField" text to go away by hand by moving formPanel.add(radioGroup); after the first Radio is added to the group.
Perhaps the designer should do the same automatically.
gaspo
 
Posts: 21
Joined: Thu Oct 08, 2009 11:28 pm

Re: GXT: RadioGroup exception

Postby Konstantin.Scheglov » Tue Oct 27, 2009 4:12 am

I can not reproduce this.
When I use following code:

Code: Select all
public class Dialog_1 extends Dialog {
   public Dialog_1() {
      setModal(true);
      setHeading("New Dialog");
      setLayout(new RowLayout(Orientation.VERTICAL));
      {
         RadioGroup radioGroup = new RadioGroup();
         add(radioGroup);
         radioGroup.setFieldLabel("New RadioGroup");
      }
   }
}


...and drop new Radio, it generates:

Code: Select all
public class Dialog_1 extends Dialog {
   public Dialog_1() {
      setModal(true);
      setHeading("New Dialog");
      setLayout(new RowLayout(Orientation.VERTICAL));
      {
         RadioGroup radioGroup = new RadioGroup();
         {
            Radio radio = new Radio();
            radioGroup.add(radio);
            radio.setBoxLabel("New Radio");
            radio.setHideLabel(true);
         }
         add(radioGroup);
         radioGroup.setFieldLabel("New RadioGroup");
      }
   }
}


...and this works as expected, no "Empty MultiField" message.

I can confirm, that if Radio added after adding RadioGroup, this causes "Empty MultiField" message.
Attachments
Screenshot - 27.10.2009 , 15_16_14.png
No "empty" message.
Screenshot - 27.10.2009 , 15_16_14.png (3.11 KiB) Viewed 534 times
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: GXT: RadioGroup exception

Postby gaspo » Tue Oct 27, 2009 2:42 pm

Ok, I found when it does not work. My WindowBuilder preferences are set to put components into initGUI() method.
When I change preferences not to use initGUI() then it works as expected.

Here is the code generated when using init GUI()

Code: Select all
public class MyDialog extends Dialog
{
  private RadioGroup radioGroup;
  public MyDialog()
  {
    initGUI();
  }
  private void initGUI() {
    setModal(true);
    setHeading("New Dialog");
    {
      radioGroup = new RadioGroup();
      add(radioGroup);
      radioGroup.setFieldLabel("New RadioGroup");
    }
    {
      Radio radio = new Radio();
      radioGroup.add(radio);
      radio.setBoxLabel("New Radio");
      radio.setHideLabel(true);
    }
  }
}
gaspo
 
Posts: 21
Joined: Thu Oct 08, 2009 11:28 pm

Re: GXT: RadioGroup exception

Postby Eric Clayberg » Wed Oct 28, 2009 6:18 am

Give this a try using the latest GWT Designer v7.2 build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: GXT: RadioGroup exception

Postby gaspo » Thu Oct 29, 2009 6:15 am

Thanks, it works now perfectly.
gaspo
 
Posts: 21
Joined: Thu Oct 08, 2009 11:28 pm

Re: GXT: RadioGroup exception

Postby Eric Clayberg » Thu Oct 29, 2009 6:34 am

Glad to hear it.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest