Possible Duplicate:
Smartgwt selectitem key value issue
I'm using setEditorCustomizer to set custom editors for some fields in a ListGrid, my specific problem is on a SelectItem
Something like this:
grid.setEditorCustomizer(new ListGridEditorCustomizer() {
public FormItem getEditor(ListGridEditorContext context) {
SelectItem selectItem = new SelectItem();
LinkedHashMap<String, String> valuesMap = new LinkedHashMap<String, String>();
valuesMap.put("0","some text");
valuesMap.put("1","other text");
selectItem.setValueMap(valuesMap);
}
}
Note that I'm not creating select items for every row.
Everything works great when editing the row, I see "some text" and "other text" in the dropdown but when I'm not editing the value I see the corresponding key instead of the value.
I have searched the javadoc but couldn't find anything, if anything is not explicit please ask and I will add.