PDA

View Full Version : Nothing renders on page after adding a combox box.



bpaye1
21 Jul 2009, 10:06 AM
Here is my code:

public void onModuleLoad() {

RootPanel.get().add(new ComboBox<ModelData>());

RootPanel.get().add(new HTML("WORKKKKKKKKK"));

RootPanel.get().add(new Button("Test"));

}

The combo box is displayed but the HTML and the button are not displayed.

Help is appreciated

The_Jackal
21 Jul 2009, 5:39 PM
Add these items to a ContentPanel and then add the ContentPanel to the root.

Also consider using a SimpleComboBox (see the examples) to make sure you're not getting any errors with the ComboBox.

sven
21 Jul 2009, 5:46 PM
There is an exception thrown as a combobox needs a store. That is why nothing is added to the rootpanel.