Hello,
i think there is a Bug in the RadioGroupItem. Try the following Code in the Feature Explorer:
This will result in an error. If you try to define the valueMap direkly in the field definition, it works. Adding the ValueMap afterwards results in a error.
I think the Problem is this Line inside of the ISC_Forms.js :
I think the Bugfix in the comment should do it. Its just not null safe right now. Is ist possible that you fix it in a nightly build of the Version 9.1? Jumping to a higher Version would be a disaster...
i think there is a Bug in the RadioGroupItem. Try the following Code in the Feature Explorer:
Code:
var myForm = isc.DynamicForm.create({ fields: [{ name: 'myOptions', type: 'radioGroup' //,valueMap: {'option1' : 'optionOne', 'option2' : 'optionTwo'} }] }); myForm.getField('myOptions').setValueMap({'option1' : 'optionOne', 'option2' : 'optionTwo'}); var radioGroupItem = myForm.getField('myOptions'); radioGroupItem.setValueDisabled('option2', true);
I think the Problem is this Line inside of the ISC_Forms.js :
Code:
//> @attr radioGroupItem.disabledValues (Array of String : null : I) // This property allows you to specify an initial set of disabled options within // this radioGroup. Once the RadioGroupItem has been created +link{setValueDisabled()} // should be used to enable and disable options. // @visibility external //< //> @method radioGroupItem.setValueDisabled() // Disable or Enable a specific option within this radioGroup // [USER="45788"]param[/USER] value (any) value of option to disable // [USER="45788"]param[/USER] disabled (boolean) true to disable the option, false to enable it // @visibility external //< setValueDisabled : function (value, disabled) { if (this._disabledValues != null && this._disabledValues[value] == disabled) return; var item = this.itemForValue(value); if (item && this.items.contains(item)) { // call 'setDisabled' on the item directly. // This is overridden to update our "disabled values" object item.setDisabled(disabled); // Support changing the disabled status for a value even if it // doesn't have an associated item. This actually means you can disable a value // that isn't necessarily in the valueMap - and if the valueMap is updated to // include it the item in question will show up disabled. } else { this._disabledValues[value] = disabled; //bug! fix -> this._itemDisabled(value, disabled); } }
Comment