I’m trying to add one option per default in my selectItem, it has binding one datasource and after do that i try to add one option per default. My problem is that i always see the items in the datasource but never my default option. Those are my lines of code :
Option 1
LinkedHashMap<String, String> valueMap= new LinkedHashMap<String, String>();
valueMap.put("null","null3");
branchSelectionItem.setValueMap(valueMap);
Option 2
Record rec = new Record();
rec.setAttribute("Name","asdad");
branchDs.addData(rec);
branchSelectionItem.setOptionDataSource(branchDs);
I used to methods first one try to add with valueMap option and the second one is add one record to my datasource, but any of them works. Any Idea ?
thanks a lot!!
Ok , i solved this problem adding a empty value for select again for default.