X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_form_Radio.js.html;h=d1feaf950792a249111f015b4b351afb10fd67fd;hb=ace3bd1cd175b8285e20933c004e7c5aa826028a;hp=31049d391541a2c553408530454216c9bb6a7129;hpb=c4ec853f8b86740a021ea3e6669f2d903878a229;p=roojs1 diff --git a/docs/src/Roo_form_Radio.js.html b/docs/src/Roo_form_Radio.js.html index 31049d3915..d1feaf9507 100644 --- a/docs/src/Roo_form_Radio.js.html +++ b/docs/src/Roo_form_Radio.js.html @@ -60,7 +60,47 @@ this.el.dom.checked = 'checked' ; } - } + }, + /** + * Sets the checked state of the checkbox. + * On is always based on a string comparison between inputValue and the param. + * @param {Boolean/String} value - the value to set + * @param {Boolean/String} suppressEvent - whether to suppress the checkchange event. + */ + setValue : function(v,suppressEvent){ + + + //this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on'); + //if(this.el && this.el.dom){ + // this.el.dom.checked = this.checked; + // this.el.dom.defaultChecked = this.checked; + //} + this.setChecked(String(v) === String(this.inputValue), suppressEvent); + + this.el.dom.form[this.name].value = v; + + //this.fireEvent("check", this, this.checked); + }, + // private.. + setChecked : function(state,suppressEvent) + { + if(this.wrap){ + this.wrap[state ? 'addClass' : 'removeClass']('x-menu-item-checked'); + } + this.checked = state; + if(suppressEvent !== true){ + this.fireEvent('check', this, state); + } + + + + + }, + reset : function(){ + // this.setValue(this.resetValue); + //this.originalValue = this.getValue(); + this.clearInvalid(); + } }); \ No newline at end of file