Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

[bug] SelectItem with multiple selections and required validator

$
0
0
SmartClient Version: v10.0p_2015-06-30/Enterprise Development Only (built 2015-06-30)

Chrome on OSX

Please modify the #multiSelect sample like this:
Code:

isc.DynamicForm.create({
    ID:"exampleForm",
    width:450,
    fields: [
        {
            type:"select",
            title:"Select Multiple (PickList)",
            multiple:true, required:true,
            multipleAppearance:"picklist",
            valueMap: [ "Cat", "Dog", "Giraffe", "Goat", "Marmoset", "Mouse" ]
        },
{name:"validateButton", type:"button", title:"Validate", click:function(form, item) {form.validate()}}
    ]
});

When you select an item, you'll get these warnings in the developer console:
11:59:43.946:MUP5:WARN:SelectItem:isc_SelectItem_1:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
11:59:43.946:MUP5:WARN:SelectItem:isc_SelectItem_1:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
11:59:43.947:MUP5:WARN:SelectItem:isc_SelectItem_1:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.
11:59:43.947:MUP5:WARN:SelectItem:isc_SelectItem_1:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.

and if you click 'Validate' you'll get this error:

12:00:30.321:MUP7:WARN:Log:TypeError: Cannot read property 'contains' of undefined
Stack from error.stack:
DynamicForm.addValidationError(<no args: exited>) on [DynamicForm ID:exampleForm] @ ISC_Core.js:3379:10
DynamicForm.addValidationError(<no args: exited>) on [DynamicForm ID:exampleForm] @ ISC_Core.js:3377:1359
DynamicForm.validate(<no args: exited>) on [DynamicForm ID:exampleForm] @ ISC_Forms.js:441:31
[a]ButtonItem.click(<no args: exited>) on [ButtonItem ID:isc_ButtonItem_0 name:validateButton] @ [no file]:12:91
ButtonItem.fireStandardHandler(<no args: exited>) on [ButtonItem ID:isc_ButtonItem_0 name:validateButton] @ ISC_Forms.js:1059:143
ButtonItem.handleClick(<no args: exited>) on [ButtonItem ID:isc_ButtonItem_0 name:validateButton] @ ISC_Forms.js:1061:41
[o]IButton.handleActivate(<no args: exited>) on [IButton ID:isc_ButtonItem_0_button] @ ISC_Forms.js:1386:114
IButton.handleClick(<no args: exited>) on [IButton ID:isc_ButtonItem_0_button] @ ISC_Foundation.js:226:13
[a][c]Class.invokeSuper(<no args: exited>) on [IButton ID:isc_ButtonItem_0_button] @ ISC_Core.js:276:93
[a][c]Class.Super(<no args: exited>) on [IButton ID:isc_ButtonItem_0_button] @ ISC_Core.js:268:170

Viewing all articles
Browse latest Browse all 4756

Trending Articles