src/aria/widgets/form/Input.js
function (cfg) {
            var metaDataObject, localMetaDataObject, localMetaParam;
            var toBind = this.automaticallyBindedProperties;
            var value = null;
            if (cfg) {
                if (cfg.bind) {
                    value = cfg.bind.value; // get any binding on the value
                    // property
                }
            }

            if (value && value.inside) { // only add the meta data convention
                // if a value property has been
                // bound
                metaDataObject = ariaUtilsData._getMeta(value.inside, value.to, false);
                if (!cfg.bind.error) {
                    cfg.bind.error = {
                        "inside" : metaDataObject,
                        "to" : "error"
                    };
                }
                if (!cfg.bind.errorMessages) {
                    cfg.bind.errorMessages = {
                        "inside" : metaDataObject,
                        "to" : "errorMessages"
                    };
                }
                // TODO: need a separation of each widget instances
                // formatErrorMessages,
                // currently no way to reference a widget after it has been
                // disposed.
                // Once this has been resolved then the widget instance
                // reference can be used to create special meta to
                // separate each widgets formatErrorMessages.
                if (!cfg.bind.formatErrorMessages) {
                    cfg.bind.formatErrorMessages = {
                        "inside" : metaDataObject,
                        "to" : "formatErrorMessages"
                    };
                }
                if (!cfg.bind.requireFocus) {
                    cfg.bind.requireFocus = {
                        "inside" : metaDataObject,
                        "to" : "requireFocus"
                    };
                }

                if (cfg.inputMetaData) { // check to see if the inputMetaData
                    // convention is needed, then add
                    // the meta
                    // data for the rest of the automatic bindings
                    localMetaParam = "local:" + cfg.inputMetaData;
                    localMetaDataObject = metaDataObject[localMetaParam];
                    if (localMetaDataObject == null) {
                        localMetaDataObject = {};
                        metaDataObject[localMetaParam] = localMetaDataObject;
                    }

                    for (var i = 0; i < toBind.length; i++) {
                        if (!cfg.bind[toBind[i]]) { // only add a binding if one
                            // doesn't exist
                            cfg.bind[toBind[i]] = {
                                "inside" : localMetaDataObject,
                                "to" : toBind[i]
                            };
                        }
                    }
                }
            }
        }
function (cfg) {
            var metaDataObject, localMetaDataObject, localMetaParam;
            var toBind = this.automaticallyBindedProperties;
            var value = null;
            if (cfg) {
                if (cfg.bind) {
                    value = cfg.bind.value; // get any binding on the value
                    // property
                }
            }

            if (value && value.inside) { // only add the meta data convention
                // if a value property has been
                // bound
                metaDataObject = ariaUtilsData._getMeta(value.inside, value.to, false);
                if (!cfg.bind.error) {
                    cfg.bind.error = {
                        "inside" : metaDataObject,
                        "to" : "error"
                    };
                }
                if (!cfg.bind.errorMessages) {
                    cfg.bind.errorMessages = {
                        "inside" : metaDataObject,
                        "to" : "errorMessages"
                    };
                }
                // TODO: need a separation of each widget instances
                // formatErrorMessages,
                // currently no way to reference a widget after it has been
                // disposed.
                // Once this has been resolved then the widget instance
                // reference can be used to create special meta to
                // separate each widgets formatErrorMessages.
                if (!cfg.bind.formatErrorMessages) {
                    cfg.bind.formatErrorMessages = {
                        "inside" : metaDataObject,
                        "to" : "formatErrorMessages"
                    };
                }
                if (!cfg.bind.requireFocus) {
                    cfg.bind.requireFocus = {
                        "inside" : metaDataObject,
                        "to" : "requireFocus"
                    };
                }

                if (cfg.inputMetaData) { // check to see if the inputMetaData
                    // convention is needed, then add
                    // the meta
                    // data for the rest of the automatic bindings
                    localMetaParam = "local:" + cfg.inputMetaData;
                    localMetaDataObject = metaDataObject[localMetaParam];
                    if (localMetaDataObject == null) {
                        localMetaDataObject = {};
                        metaDataObject[localMetaParam] = localMetaDataObject;
                    }

                    for (var i = 0; i < toBind.length; i++) {
                        if (!cfg.bind[toBind[i]]) { // only add a binding if one
                            // doesn't exist
                            cfg.bind[toBind[i]] = {
                                "inside" : localMetaDataObject,
                                "to" : toBind[i]
                            };
                        }
                    }
                }
            }
        }
function ( cfg ) { var metaDataObject , localMetaDataObject , localMetaParam ; var toBind = this . automaticallyBindedProperties ; var value = null ; if ( cfg ) { if ( cfg . bind ) { value = cfg . bind . value ; // get any binding on the value // property } } if ( value && value . inside ) { // only add the meta data convention // if a value property has been // bound metaDataObject = ariaUtilsData . _getMeta ( value . inside , value . to , false ) ; if ( ! cfg . bind . error ) { cfg . bind . error = { "inside" : metaDataObject , "to" : "error" } ; } if ( ! cfg . bind . errorMessages ) { cfg . bind . errorMessages = { "inside" : metaDataObject , "to" : "errorMessages" } ; } // TODO: need a separation of each widget instances // formatErrorMessages, // currently no way to reference a widget after it has been // disposed. // Once this has been resolved then the widget instance // reference can be used to create special meta to // separate each widgets formatErrorMessages. if ( ! cfg . bind . formatErrorMessages ) { cfg . bind . formatErrorMessages = { "inside" : metaDataObject , "to" : "formatErrorMessages" } ; } if ( ! cfg . bind . requireFocus ) { cfg . bind . requireFocus = { "inside" : metaDataObject , "to" : "requireFocus" } ; } if ( cfg . inputMetaData ) { // check to see if the inputMetaData // convention is needed, then add // the meta // data for the rest of the automatic bindings localMetaParam = "local:" + cfg . inputMetaData ; localMetaDataObject = metaDataObject [ localMetaParam ] ; if ( localMetaDataObject == null ) { localMetaDataObject = { } ; metaDataObject [ localMetaParam ] = localMetaDataObject ; } for ( var i = 0 ; i < toBind . length ; i ++ ) { if ( ! cfg . bind [ toBind [ i ] ] ) { // only add a binding if one // doesn't exist cfg . bind [ toBind [ i ] ] = { "inside" : localMetaDataObject , "to" : toBind [ i ] } ; } } } } }
Apply the automatic bindings
@param {aria.widgets.CfgBeans:InputCfg|aria.widgets.CfgBeans:ActionWidgetCfg} cfg
@protected
Apply the automatic bindings