function(values) {
        var me = this,
            v, vLen, val, field;

        function setVal(fieldId, val) {
            var field = me.findField(fieldId);
            if (field) {
                field.setValue(val);
                if (me.trackResetOnLoad) {
                    field.resetOriginalValue();
                }
            }
        }

        // Suspend here because setting the value on a field could trigger
        // a layout, for example if an error gets set, or it's a display field
        Ext.suspendLayouts();
        if (Ext.isArray(values)) {
            // array of objects
            vLen = values.length;

            for (v = 0; v < vLen; v++) {
                val = values[v];

                setVal(val.id, val.value);
            }
        } else {
            // object hash
            Ext.iterate(values, setVal);
        }
        Ext.resumeLayouts(true);
        return this;
    }
function(values) {
        var me = this,
            v, vLen, val, field;

        function setVal(fieldId, val) {
            var field = me.findField(fieldId);
            if (field) {
                field.setValue(val);
                if (me.trackResetOnLoad) {
                    field.resetOriginalValue();
                }
            }
        }

        
        
        Ext.suspendLayouts();
        if (Ext.isArray(values)) {
            
            vLen = values.length;

            for (v = 0; v < vLen; v++) {
                val = values[v];

                setVal(val.id, val.value);
            }
        } else {
            
            Ext.iterate(values, setVal);
        }
        Ext.resumeLayouts(true);
        return this;
    }
function ( values ) { var me = this , v , vLen , val , field ; function setVal ( fieldId , val ) { var field = me . findField ( fieldId ) ; if ( field ) { field . setValue ( val ) ; if ( me . trackResetOnLoad ) { field . resetOriginalValue ( ) ; } } } // Suspend here because setting the value on a field could trigger // a layout, for example if an error gets set, or it's a display field Ext . suspendLayouts ( ) ; if ( Ext . isArray ( values ) ) { // array of objects vLen = values . length ; for ( v = 0 ; v < vLen ; v ++ ) { val = values [ v ] ; setVal ( val . id , val . value ) ; } } else { // object hash Ext . iterate ( values , setVal ) ; } Ext . resumeLayouts ( true ) ; return this ; }
Set values for fields in this form in bulk.

@param {Object/Object[]} values Either an array in the form:

[{id:'clientName', value:'Fred. Olsen Lines'},
{id:'portOfLoading', value:'FXT'},
{id:'portOfDischarge', value:'OSL'} ]

or an object hash of the form:

{
clientName: 'Fred. Olsen Lines',
portOfLoading: 'FXT',
portOfDischarge: 'OSL'
}

@return {Ext.form.Basic} this
Set values for fields in this form in bulk .