dojox/form/manager/_ValueMixin.js

  • Provides:

    • dojox.form.manager._ValueMixin
  • dojox.form.manager._ValueMixin

    • type
      Function
    • summary
      Form manager's mixin for getting/setting form values in the unified manner.
    • description
      This mixin adds unified access to form widgets and form elements
      in terms of name-value regardless of the underlying type of
      an element. It should be used together with dojox.form.manager.Mixin.
  • dojox.form.manager._ValueMixin.elementValue

    • type
      Function
    • parameters:
      • name: (typeof String)
        The name.
      • value: (typeof Object)
        Optional. The value to set.
    • source: [view]
        if(name in this.formWidgets){
         return this.formWidgetValue(name, value); // Object
        }


        if(this.formNodes && name in this.formNodes){
         return this.formNodeValue(name, value); // Object
        }


        return this.formPointValue(name, value); // Object
    • summary
      Set or get a form widget/element or an attached point node by name.
    • returns
      Object
  • dojox.form.manager._ValueMixin.gatherFormValues

    • type
      Function
    • parameters:
      • names: (typeof Object)
        If it is an array, it is a list of names of form elements to be collected.
        If it is an object, dictionary keys are names to be collected.
        If it is omitted, all known form elements are to be collected.
    • source: [view]
        var result = this.inspectFormWidgets(function(name){
         return this.formWidgetValue(name);
        }, names);


        if(this.inspectFormNodes){
         dojo.mixin(result, this.inspectFormNodes(function(name){
          return this.formNodeValue(name);
         }, names));
        }


        dojo.mixin(result, this.inspectAttachedPoints(function(name){
         return this.formPointValue(name);
        }, names));


        return result; // Object
    • summary
      Collect form values.
    • returns
      Object
  • dojox.form.manager._ValueMixin.setFormValues

    • type
      Function
    • parameters:
      • values: (typeof Object)
        A dictionary of key-value pairs.
    • source: [view]
        if(values){
         this.inspectFormWidgets(function(name, widget, value){
          this.formWidgetValue(name, value);
         }, values);


         if(this.inspectFormNodes){
          this.inspectFormNodes(function(name, node, value){
           this.formNodeValue(name, value);
          }, values);
         }


         this.inspectAttachedPoints(function(name, node, value){
          this.formPointValue(name, value);
         }, values);
        }
        return this;
    • summary
      Set values to form elements
  • result

    • mixins:
      • this.inspectFormNodes(function(name){ return this.formNodeValue(name); }, names): (normal)
      • this.inspectAttachedPoints(function(name){ return this.formPointValue(name); }, names): (normal)
    • summary
  • dojox.form.manager

    • type
      Object
    • summary
  • dojox.form

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary