I am facing some difficulties with GXT SimpleComboBox. Can someone please tell me how to add combo box items from an external *.xml file? Here is more details:
I have this information.ui.xml file as a uibinder. Here, I have added a simple combo box using the following code:
<row:VerticalLayoutContainer borders="true">
<f:SimpleComboBox ui:field="listBoxField"></f:SimpleComboBox>
</row:VerticalLayoutContainer>
Second, in the code-behind class (in my case, information.java), I have declared the ui field:
@UiField
SimpleComboBox<String> listBoxField;
Then, in the asWidget() method block, I have added some entries manually, as in:
listBoxField.add("A");
listBoxField.add("B");
listBoxField.add("C");
listBoxField.add("D");
listBoxField.add("E");
listBoxField.add("F");
listBoxField.add("G");
listBoxField.add("H");
This is a hard-coded approach. Now I am willing to get rid of the hard-coding part. I want to add the listBoxField items (A, B, C... H) directly from an external *.xml file. Can anyone help me on how to do that?
Thanks.