dojox/wire/TextAdapter.js

  • Provides:

    • dojox.wire.TextAdapter
  • Requires:

    • dojox.wire.CompositeWire in common
  • dojox.wire.TextAdapter

    • type
      Function
    • chains:
      • dojox.wire.CompositeWire: (prototype)
      • dojox.wire.CompositeWire: (call)
    • summary
      Initialize properties
    • description
      If array elements specified in 'segments' 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
        segments:
        An array containing child Wires for text segment values
    • source: [view]
        this._initializeChildren(this.segments);
        if(!this.delimiter){
         this.delimiter = "";
        }
  • dojox.wire.TextAdapter._wireClass

    • summary
  • dojox.wire.TextAdapter._getValue

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


        var text = "";
        for(var i in this.segments){
         var segment = this.segments[i].getValue(object);
         text = this._addSegment(text, segment);
        }
        return text; //String
    • summary
      Return a concatenated text
    • description
      This method calls getValue() method of the child Wires wuth
      'object' argument and concatenate the values with 'delimiter'
      property to return.
      arg:
      A root object
    • return_summary
      A concatinated text
    • returns
      Object||Array|String
  • dojox.wire.TextAdapter._setValue

    • type
      Function
    • parameters:
      • object: (typeof Object||Array)
      • value: (typeof String)
    • source: [view]
        throw new Error("Unsupported API: " + this._wireClass + "._setValue");
    • summary
      Not supported
  • dojox.wire.TextAdapter._addSegment

    • type
      Function
    • parameters:
      • text: (typeof String)
        A base text
      • segment: (typeof String)
        A text segment to add
    • source: [view]
        if(!segment){
         return text; //String
        }else if(!text){
         return segment; //String
        }else{
         return text + this.delimiter + segment; //String
        }
    • summary
      Return a concatenated text
    • description
      This method add a text segment specified to 'segment' argument
      to a base text specified to 'text', with 'delimiter' property.
    • return_summary
      A concatinated text
    • returns
      String
  • dojox.wire.TextAdapter.delimiter

    • type
      A
    • summary
      delimiter string
  • dojox.wire

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary