X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/src/form/field/Checkbox.js diff --git a/src/form/field/Checkbox.js b/src/form/field/Checkbox.js index 2f8611ba..e4df1521 100644 --- a/src/form/field/Checkbox.js +++ b/src/form/field/Checkbox.js @@ -71,7 +71,7 @@ __Example usage:__ var checkbox1 = Ext.getCmp('checkbox1'), checkbox2 = Ext.getCmp('checkbox2'), checkbox3 = Ext.getCmp('checkbox3'); - + checkbox1.setValue(true); checkbox2.setValue(true); checkbox3.setValue(true); @@ -83,7 +83,7 @@ __Example usage:__ var checkbox1 = Ext.getCmp('checkbox1'), checkbox2 = Ext.getCmp('checkbox2'), checkbox3 = Ext.getCmp('checkbox3'); - + checkbox1.setValue(false); checkbox2.setValue(false); checkbox3.setValue(false); @@ -284,11 +284,9 @@ Ext.define('Ext.form.field.Checkbox', { * @return {Boolean/null} True if checked; otherwise either the {@link #uncheckedValue} or null. */ getSubmitValue: function() { - return this.checked ? this.inputValue : (this.uncheckedValue || null); - }, - - getModelData: function() { - return this.getSubmitData(); + var unchecked = this.uncheckedValue, + uncheckedVal = Ext.isDefined(unchecked) ? unchecked : null; + return this.checked ? this.inputValue : uncheckedVal; }, /**