PDA

View Full Version : MultiSelect and empty submit



stimpy
8 Oct 2012, 9:59 AM
I have a MultiSelect in a form .



xtype:'multiselector',
name:'myItemSelector',
itemId:'myItemSelectorId',
allowBlank:true,
store:'mySelOpts' ,
displayField:'selName',
valueField:'selId',
listeners:{
beforerender:function(){ this.store.load(); }
}

When the MultiSelect is submitted without a selection being made ( which is ok ) Ext throws an error

"val is undefined"
on line 325 of MultiSelect
which is

return Ext.isString(delimiter) ?val.join(delimiter) :val

Delimiter is , which is fine but value is and should be undefined at this point.
Since the submit never completes the submission hangs . Everything works fine if I select a value but i need to accept empty submissions.

Anyone seen this before and know how to get around it ?

stimpy
8 Oct 2012, 11:03 AM
After a little more poking around

It seems that "val" is undefined and thus has no join method.

This is not a surprise but it seems like its either a bug or something is not happening.

I could set the value to a blank array onRender but I am concerned something is wrong .

Is anyone else seeing this on submission of a empty MultiSelect?