Hi,
I've noticed a malfunction in the validation process of a MultiComboBoxItem; in this case i'm just using a simple "required" validator.
Step to reproduce the problem (use attached showcase):
1. Select a value from the Items field
2. Press the validation button (validate() should return true)
3. Remove the previuosly selected item
4. Press again the validation button and validate() still returns true although the field is empty
Is this an expected behavior ?
As test case i've used the MultiComboBoxItem page in the feature explorer system (10.0/SDK Development Only).
This is the code to paste to reproduce the bug:
I think i've figured out where the problem is:
1. If nothing has never been selected, the value returned from the MultiComboBoxItem is null and the validation ("required" in my case) works good.
2. If something is selected, the value returned from the MultiComboBoxItem is an Array...Something like this ["90600"] and the validation keeps working good.
3. If all the previously selected items are cleared out by unselecting them, which means that the MultiComboBoxItem is empty again; the returned value is an empty array [] and not the null value returned by case 1
I've noticed a malfunction in the validation process of a MultiComboBoxItem; in this case i'm just using a simple "required" validator.
Step to reproduce the problem (use attached showcase):
1. Select a value from the Items field
2. Press the validation button (validate() should return true)
3. Remove the previuosly selected item
4. Press again the validation button and validate() still returns true although the field is empty
Is this an expected behavior ?
As test case i've used the MultiComboBoxItem page in the feature explorer system (10.0/SDK Development Only).
This is the code to paste to reproduce the bug:
Code:
isc.VStack.create({
showEdges: true,
width: 150,
membersMargin: 5,
layoutMargin: 10,
members: [
isc.DynamicForm.create({
ID: "selectedSupplyItems",
width: "100%",
numCols: 1,
titleOrientation: "top",
fields: [{
name: "supplies",
ID:"mcbiField",
title: "Items",
editorType: "MultiComboBoxItem",
comboBoxProperties: {
pickListWidth: 290
},
optionDataSource: "supplyItem",
displayField: "itemName",
valueField: "SKU",
required: true,
autoFetchData: true,
layoutStyle: "flow",
addUnknownValues: true
}]
}),
isc.Button.create({
ID: "bugValidationButton",
title: "Validate Form",
click:function(){
var validateStatus = selectedSupplyItems.validate() ? "OK" : "KO";
validationLabel.setContents("Validation status: <b>"+validateStatus+"</b>");
valueLabel.setContents(""+mcbiField.getValue());
}
}),
isc.Label.create({
ID:"validationLabel"
}),
isc.Label.create({
ID:"valueLabel"
})
]
})1. If nothing has never been selected, the value returned from the MultiComboBoxItem is null and the validation ("required" in my case) works good.
2. If something is selected, the value returned from the MultiComboBoxItem is an Array...Something like this ["90600"] and the validation keeps working good.
3. If all the previously selected items are cleared out by unselecting them, which means that the MultiComboBoxItem is empty again; the returned value is an empty array [] and not the null value returned by case 1