Isomorphic,
We noticed the following change in behavior after applying the latest Smart GWT build.
Setting the value of SelectItem for a multi-valued integer field to an empty array now results in a validation error of "Must be a whole number" and "NaN" is displayed in the SelectItem.
You can reproduce this with the sample code below.
We are using SmartClient Version: v12.0p_2019-10-16/Pro Deployment (built 2019-10-16).
Thanks.
We noticed the following change in behavior after applying the latest Smart GWT build.
Setting the value of SelectItem for a multi-valued integer field to an empty array now results in a validation error of "Must be a whole number" and "NaN" is displayed in the SelectItem.
You can reproduce this with the sample code below.
We are using SmartClient Version: v12.0p_2019-10-16/Pro Deployment (built 2019-10-16).
Thanks.
Code:
public void onModuleLoad() {
DynamicForm selectComboForm = new DynamicForm();
selectComboForm.setWidth(600);
final SelectItem selectItemMultiplePickList = new SelectItem();
selectItemMultiplePickList.setType("integer");
selectItemMultiplePickList.setTitle("Select Multiple (PickList)");
selectItemMultiplePickList.setMultiple(true);
selectItemMultiplePickList.setMultipleAppearance(MultipleAppearance.PICKLIST);
LinkedHashMap<Integer, String> valueMap = new LinkedHashMap<>();
valueMap.put(Integer.valueOf(1), "Cat");
valueMap.put(Integer.valueOf(2), "Dog");
valueMap.put(Integer.valueOf(4), "Giraffe");
valueMap.put(Integer.valueOf(8), "Goat");
valueMap.put(Integer.valueOf(16), "Marmoset");
valueMap.put(Integer.valueOf(32), "Mouse");
selectItemMultiplePickList.setValueMap(valueMap);
selectItemMultiplePickList.setValue(new Integer[] {});
selectComboForm.setItems(selectItemMultiplePickList);
IButton validateButton = new IButton("Validate");
validateButton.setWidth(200);
validateButton.addClickHandler(event -> selectComboForm.validate());
VLayout vLayout = new VLayout();
vLayout.setMembersMargin(10);
vLayout.addMember(selectComboForm);
HStack hStack = new HStack();
hStack.setMembersMargin(10);
hStack.addMember(validateButton);
vLayout.addMember(hStack);
vLayout.draw();
}
Comment