X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/source/BasicForm.html?ds=inline diff --git a/docs/source/BasicForm.html b/docs/source/BasicForm.html index 72f5ff3d..36d4c003 100644 --- a/docs/source/BasicForm.html +++ b/docs/source/BasicForm.html @@ -1,17 +1,12 @@ - - - The source code - - - - -
/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-
/** + + + + The source code + + + + +
/** * @class Ext.form.BasicForm * @extends Ext.util.Observable *

Encapsulates the DOM <form> element at the heart of the {@link Ext.form.FormPanel FormPanel} class, and provides @@ -47,9 +42,9 @@ Ext.form.BasicForm = function(el, config){ this.paramOrder = this.paramOrder.split(/[\s,|]/); }

/** - * @property items - * A {@link Ext.util.MixedCollection MixedCollection) containing all the Ext.form.Fields in this form. + * A {@link Ext.util.MixedCollection MixedCollection} containing all the Ext.form.Fields in this form. * @type MixedCollection + * @property items */ this.items = new Ext.util.MixedCollection(false, function(o){ return o.getItemId(); @@ -190,7 +185,7 @@ paramOrder: 'param1|param2|param' * {@link #paramOrder} nullifies this configuration. */ paramsAsHash: false, - +
/** * @cfg {String} waitTitle * The default title to show for the waiting message box (defaults to 'Please Wait...') @@ -641,10 +636,33 @@ myFormPanel.getForm().submit({ return Ext.urlDecode(fs); }, - getFieldValues : function(){ - var o = {}; +
/** + * Retrieves the fields in the form as a set of key/value pairs, using the {@link Ext.form.Field#getValue getValue()} method. + * If multiple fields exist with the same name they are returned as an array. + * @param {Boolean} dirtyOnly (optional) True to return only fields that are dirty. + * @return {Object} The values in the form + */ + getFieldValues : function(dirtyOnly){ + var o = {}, + n, + key, + val; this.items.each(function(f){ - o[f.getName()] = f.getValue(); + if(dirtyOnly !== true || f.isDirty()){ + n = f.getName(); + key = o[n]; + val = f.getValue(); + + if(Ext.isDefined(key)){ + if(Ext.isArray(key)){ + o[n].push(val); + }else{ + o[n] = [key, val]; + } + }else{ + o[n] = val; + } + } }); return o; }, @@ -750,6 +768,6 @@ myFormPanel.getForm().submit({ }); // back compat -Ext.BasicForm = Ext.form.BasicForm;
- +Ext.BasicForm = Ext.form.BasicForm;
+ \ No newline at end of file