|
following is extracted from an inbuilt sample from
cocoon's woody form. I don't quite understand what is the story. it seems:
1. wb:context matches with the root element
"/wd:form" of a woody form definition file. Is this right?
2. a class "widgets-class" is defined in
"/wd:form/wd:widgets". what does row-path="*" mean? what is its
different with "row-path-insert"?
<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> |
