Announcement
Collapse
No announcement yet.
X
-
Thanks for the notification and the clear test case
We've made a change to address this issue. Please try the next nightly build dated Oct 29 or above
Regards
Isomorphic Software
Leave a comment:
-
Validation error from SelectItem for multi-valued integer field after Smart GWT update.
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.
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(); }
Tags: None
Leave a comment: