| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!-- |
| Binding for example CForms form model GUI. |
| |
| @author: Tim Larson |
| @version CVS $Id$ |
| --> |
| |
| <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> |
| |
| <wb:class id="aggregatefield-class"> |
| <wb:case id="aggregatefield" path="."> |
| <wb:insert-node> |
| <wd:aggregatefield/> |
| </wb:insert-node> |
| <wb:struct id="aggregatefield" path="wd:aggregatefield"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| <wb:insert-node><wd:widgets/></wb:insert-node> |
| <wb:new id="widgets-class"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="booleanfield-class"> |
| <wb:case id="booleanfield" path="."> |
| <wb:insert-node> |
| <wd:booleanfield/> |
| </wb:insert-node> |
| <wb:struct id="booleanfield" path="wd:booleanfield"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="class-class"> |
| <wb:case id="class" path="."> |
| <wb:insert-node> |
| <wd:class/> |
| </wb:insert-node> |
| <wb:struct id="class" path="wd:class"> |
| <wb:value id="id" path="@id"/> |
| <wb:insert-node><wd:widgets/></wb:insert-node> |
| <wb:new id="widgets-class"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="field-class"> |
| <wb:case id="field" path="."> |
| <wb:insert-node> |
| <wd:field/> |
| </wb:insert-node> |
| <wb:struct id="field" path="wd:field"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| <wb:value id="required" path="@required"> |
| <wd:convertor datatype="boolean"/> |
| </wb:value> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="new-class"> |
| <wb:case id="new" path="."> |
| <wb:insert-node> |
| <wd:new/> |
| </wb:insert-node> |
| <wb:struct id="new" path="wd:new"> |
| <wb:value id="id" path="@id"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="output-class"> |
| <wb:case id="output" path="."> |
| <wb:insert-node> |
| <wd:output/> |
| </wb:insert-node> |
| <wb:struct id="output" path="wd:output"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="repeater-class"> |
| <wb:case id="repeater" path="."> |
| <wb:insert-node> |
| <wd:repeater/> |
| </wb:insert-node> |
| <wb:struct id="repeater" path="wd:repeater"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| <wb:value id="initial-size" path="@initial-size"> |
| <wd:convertor datatype="long"/> |
| </wb:value> |
| <wb:insert-node><wd:widgets/></wb:insert-node> |
| <wb:new id="widgets-class"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="row-action-class"> |
| <wb:case id="row-action" path="."> |
| <wb:insert-node> |
| <wd:row-action/> |
| </wb:insert-node> |
| <wb:struct id="row-action" path="wd:row-action"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="struct-class"> |
| <wb:case id="struct" path="."> |
| <wb:insert-node> |
| <wd:struct/> |
| </wb:insert-node> |
| <wb:struct id="struct" path="wd:struct"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| <wb:insert-node><wd:widgets/></wb:insert-node> |
| <wb:new id="widgets-class"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="submit-class"> |
| <wb:case id="submit" path="."> |
| <wb:insert-node> |
| <wd:submit/> |
| </wb:insert-node> |
| <wb:struct id="submit" path="wd:submit"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| <wb:class id="union-class"> |
| <wb:case id="union" path="."> |
| <wb:insert-node> |
| <wd:union/> |
| </wb:insert-node> |
| <wb:struct id="union" path="wd:union"> |
| <wb:value id="id" path="@id"/> |
| <wb:value id="label" path="wd:label"/> |
| <wb:insert-node><wd:widgets/></wb:insert-node> |
| <wb:new id="widgets-class"/> |
| </wb:struct> |
| </wb:case> |
| </wb:class> |
| |
| </wb:context> |