dojox/wire/CompositeWire.js

  • Provides:

    • dojox.wire.CompositeWire
  • Requires:

    • dojox.wire._base in common
    • dojox.wire.Wire in common
  • dojox.wire.CompositeWire

    • type
      Function
    • chains:
      • dojox.wire.Wire: (prototype)
      • dojox.wire.Wire: (call)
    • summary
      Initialize properties
    • description
      If object properties or array elements specified in 'children'
      property are not Wires, Wires are created from them as
      arguments, with 'parent' property set to this Wire instance.
    • parameters:
      • args: (typeof Object)
        Arguments to initialize properties
        children:
        An object or array containing child Wires
    • source: [view]
        this._initializeChildren(this.children);
  • dojox.wire.CompositeWire._wireClass

    • summary
  • dojox.wire.CompositeWire._getValue

    • type
      Function
    • parameters:
      • object: (typeof Object||Array)
        A root object
    • source: [view]
        if(!object || !this.children){
         return object; //Object||Array
        }


        var value = (dojo.isArray(this.children) ? [] : {}); // array or object
        for(var c in this.children){
         value[c] = this.children[c].getValue(object);
        }
        return value;//Object||Array
    • summary
      Return an object with property values or an array with element
      values
    • description
      This method calls getValue() method of the child Wires with
      'object' argument and returns an object with the values as
      properties or an arary of the values as elements.
    • return_summary
      An object or array with values
    • returns
      Object||Array
  • dojox.wire.CompositeWire._setValue

    • type
      Function
    • parameters:
      • object: (typeof Object||Array)
        A root object
      • value: (typeof Object||Array)
        An object or array with values to set
    • source: [view]
        if(!object || !this.children){
         return object; //Object||Array
        }


        for(var c in this.children){
         this.children[c].setValue(value[c], object);
        }
        return object; //Object||Array
    • summary
      Set an object properties or an array elements to an object
      desription:
      This method calls setValues() method of the child Wires with
      a corresponding property or element in 'value' argument and
      'object' argument.
    • return_summary
      'object'
    • returns
      Object||Array
  • dojox.wire.CompositeWire._initializeChildren

    • type
      Function
    • parameters:
      • children: (typeof Object||Array)
        An object or array containing child Wires
    • source: [view]
        if(!children){
         return; //undefined
        }


        for(var c in children){
         var child = children[c];
         child.parent = this;
         if(!dojox.wire.isWire(child)){
          children[c] = dojox.wire.create(child);
         }
        }
    • summary
      Initialize child Wires
    • description
      If object properties or array elements specified in 'children'
      argument are not Wires, Wires are created from them as
      arguments, with 'parent' property set to this Wire instance.
    • returns
      undefined
  • dojox.wire

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary