4. in the "widget-row-class" definition, it seems that the path is still "/wd:form/wd:widgets". There are many nodes under this context, what does the following two line do?
Why only the first Child? what is its localname?  
        
    var node = jxpathPointer.getNode().getFirstChild();
        widget.setValue(node.getLocalName());

 
<wb:context   xmlns:wb="http://apache.org/cocoon/woody/binding/1.0"   xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"  path="/wd:form"   lenient="true">
 
  <wb:new id="widgets-class"/>
 
  <wb:class id="widgets-class">
    <wb:temp-repeater id="widgets"     parent-path="wd:widgets"    row-path="*" row-path-insert="."     virtual-rows="true">
      <wb:on-bind>
        <wb:new id="widget-row-class"/>
      </wb:on-bind>
    </wb:temp-repeater>
  </wb:class>
 
  <wb:class id="widget-row-class">
    <wb:_javascript_ id="type" path=".">
      <wb:load-form>
        var node = jxpathPointer.getNode().getFirstChild();
        widget.setValue(node.getLocalName());
      </wb:load-form>
      <wb:save-form>
      </wb:save-form>
    </wb:_javascript_>
    <wb:union id="union" path=".">
      <wb:new id="action-class"/>
      <wb:new id="aggregatefield-class"/>
      <wb:new id="booleanfield-class"/>
      <wb:new id="class-class"/>
      <wb:new id="field-class"/>
      <wb:new id="new-class"/>
      <wb:new id="output-class"/>
      <wb:new id="repeater-class"/>
      <wb:new id="row-action-class"/>
      <wb:new id="struct-class"/>
      <wb:new id="submit-class"/>
      <wb:new id="union-class"/>
    </wb:union>
  </wb:class>
 
  <wb:class id="action-class">
    <wb:case id="action" path=".">
      <wb:insert-node>
        <wd:action/>
      </wb:insert-node>
      <wb:struct id="action" path="wd:action">
        <wb:value id="label" path="wd:label"/>
        <wb:value id="id" path="@id"/>
      </wb:struct>
    </wb:case>
  </wb:class>

Reply via email to