Hi,
I'm facing a problem with validation on SelectItem.setMultiple(true).
Datasource side code:
----------------------
Client Code
------------
Upon submitting the form, i'm validating the form. As i set multiple true on both DS and form side, it should accept multiple values selected and should not get validation error for the SelectItem because DataSourceEnumField accepts array of strings(as per api) when we set multiple true. Eventhough i'm getting proper values in, form.getValues(), its showing validation error "Not a valid option" on UI. I couldn't understand the problem.
Please tell me if i'm doing wrong or do i need to set anything.
PFA testcase and error screenshot.
I'm facing a problem with validation on SelectItem.setMultiple(true).
Datasource side code:
----------------------
Code:
DataSourceEnumField dsField=new DataSourceEnumField("ITEMS"); LinkedHashMap<String,String> map=new LinkedHashMap<String, String>(); map.put("ITEM1", "ITEM1"); map.put("ITEM2", "ITEM2"); map.put("ITEM3", "ITEM3"); map.put("ITEM4", "ITEM4"); dsField.setMultiple(true); dsField.setValueMap(map); ds.setFields(dsField);
------------
Code:
final DynamicForm dForm=new DynamicForm(); dForm.setDataSource(ds); SelectItem selItem=new SelectItem("ITEMS", "Select Items"); selItem.setMultiple(true); selItem.setMultipleAppearance(MultipleAppearance.PICKLIST);
Please tell me if i'm doing wrong or do i need to set anything.
PFA testcase and error screenshot.
Comment