home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / form_model_gui_binding.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  6.3 KB  |  227 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <!--
  19. Binding for example CForms form model GUI.
  20.  
  21. @version CVS $Id: form_model_gui_binding.xml,v 1.3 2004/04/12 14:05:09 tim Exp $
  22. -->
  23.  
  24. <fb:context
  25.   xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
  26.   xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
  27.   path="/fd:form"
  28.   lenient="true">
  29.  
  30.   <fb:new id="widgets-class"/>
  31.  
  32.   <fb:class id="widgets-class">
  33.     <fb:temp-repeater id="widgets"
  34.       parent-path="fd:widgets"
  35.       row-path="*" row-path-insert="."
  36.       virtual-rows="true">
  37.       <fb:on-bind>
  38.         <fb:new id="widget-row-class"/>
  39.       </fb:on-bind>
  40.     </fb:temp-repeater>
  41.   </fb:class>
  42.  
  43.   <fb:class id="widget-row-class">
  44.     <fb:javascript id="type" path=".">
  45.       <fb:load-form>
  46.         var node = jxpathPointer.getNode().getFirstChild();
  47.         widget.setValue(node.getLocalName());
  48.       </fb:load-form>
  49.       <fb:save-form>
  50.       </fb:save-form>
  51.     </fb:javascript>
  52.     <fb:union id="union" path=".">
  53.       <fb:new id="action-class"/>
  54.       <fb:new id="aggregatefield-class"/>
  55.       <fb:new id="booleanfield-class"/>
  56.       <fb:new id="class-class"/>
  57.       <fb:new id="field-class"/>
  58.       <fb:new id="new-class"/>
  59.       <fb:new id="output-class"/>
  60.       <fb:new id="repeater-class"/>
  61.       <fb:new id="row-action-class"/>
  62.       <fb:new id="struct-class"/>
  63.       <fb:new id="submit-class"/>
  64.       <fb:new id="union-class"/>
  65.     </fb:union>
  66.   </fb:class>
  67.  
  68.   <fb:class id="action-class">
  69.     <fb:case id="action" path=".">
  70.       <fb:insert-node>
  71.         <fd:action/>
  72.       </fb:insert-node>
  73.       <fb:struct id="action" path="fd:action">
  74.         <fb:value id="label" path="fd:label"/>
  75.         <fb:value id="id" path="@id"/>
  76.       </fb:struct>
  77.     </fb:case>
  78.   </fb:class>
  79.  
  80.   <fb:class id="aggregatefield-class">
  81.     <fb:case id="aggregatefield" path=".">
  82.       <fb:insert-node>
  83.         <fd:aggregatefield/>
  84.       </fb:insert-node>
  85.       <fb:struct id="aggregatefield" path="fd:aggregatefield">
  86.         <fb:value id="id" path="@id"/>
  87.         <fb:value id="label" path="fd:label"/>
  88.         <fb:insert-node><fd:widgets/></fb:insert-node>
  89.         <fb:new id="widgets-class"/>
  90.       </fb:struct>
  91.     </fb:case>
  92.   </fb:class>
  93.  
  94.   <fb:class id="booleanfield-class">
  95.     <fb:case id="booleanfield" path=".">
  96.       <fb:insert-node>
  97.         <fd:booleanfield/>
  98.       </fb:insert-node>
  99.       <fb:struct id="booleanfield" path="fd:booleanfield">
  100.         <fb:value id="id" path="@id"/>
  101.         <fb:value id="label" path="fd:label"/>
  102.       </fb:struct>
  103.     </fb:case>
  104.   </fb:class>
  105.  
  106.   <fb:class id="class-class">
  107.     <fb:case id="class" path=".">
  108.       <fb:insert-node>
  109.         <fd:class/>
  110.       </fb:insert-node>
  111.       <fb:struct id="class" path="fd:class">
  112.         <fb:value id="id" path="@id"/>
  113.         <fb:insert-node><fd:widgets/></fb:insert-node>
  114.         <fb:new id="widgets-class"/>
  115.       </fb:struct>
  116.     </fb:case>
  117.   </fb:class>
  118.  
  119.   <fb:class id="field-class">
  120.     <fb:case id="field" path=".">
  121.       <fb:insert-node>
  122.         <fd:field/>
  123.       </fb:insert-node>
  124.       <fb:struct id="field" path="fd:field">
  125.         <fb:value id="id" path="@id"/>
  126.         <fb:value id="label" path="fd:label"/>
  127.         <fb:value id="required" path="@required">
  128.           <fd:convertor datatype="boolean"/>
  129.         </fb:value>
  130.       </fb:struct>
  131.     </fb:case>
  132.   </fb:class>
  133.  
  134.   <fb:class id="new-class">
  135.     <fb:case id="new" path=".">
  136.       <fb:insert-node>
  137.         <fd:new/>
  138.       </fb:insert-node>
  139.       <fb:struct id="new" path="fd:new">
  140.         <fb:value id="id" path="@id"/>
  141.       </fb:struct>
  142.     </fb:case>
  143.   </fb:class>
  144.  
  145.   <fb:class id="output-class">
  146.     <fb:case id="output" path=".">
  147.       <fb:insert-node>
  148.         <fd:output/>
  149.       </fb:insert-node>
  150.       <fb:struct id="output" path="fd:output">
  151.         <fb:value id="id" path="@id"/>
  152.         <fb:value id="label" path="fd:label"/>
  153.       </fb:struct>
  154.     </fb:case>
  155.   </fb:class>
  156.  
  157.   <fb:class id="repeater-class">
  158.     <fb:case id="repeater" path=".">
  159.       <fb:insert-node>
  160.         <fd:repeater/>
  161.       </fb:insert-node>
  162.       <fb:struct id="repeater" path="fd:repeater">
  163.         <fb:value id="id" path="@id"/>
  164.         <fb:value id="label" path="fd:label"/>
  165.         <fb:value id="initial-size" path="@initial-size">
  166.           <fd:convertor datatype="long"/>
  167.         </fb:value>
  168.         <fb:insert-node><fd:widgets/></fb:insert-node>
  169.         <fb:new id="widgets-class"/>
  170.       </fb:struct>
  171.     </fb:case>
  172.   </fb:class>
  173.  
  174.   <fb:class id="row-action-class">
  175.     <fb:case id="row-action" path=".">
  176.       <fb:insert-node>
  177.         <fd:row-action/>
  178.       </fb:insert-node>
  179.       <fb:struct id="row-action" path="fd:row-action">
  180.         <fb:value id="id" path="@id"/>
  181.         <fb:value id="label" path="fd:label"/>
  182.       </fb:struct>
  183.     </fb:case>
  184.   </fb:class>
  185.  
  186.   <fb:class id="struct-class">
  187.     <fb:case id="struct" path=".">
  188.       <fb:insert-node>
  189.         <fd:struct/>
  190.       </fb:insert-node>
  191.       <fb:struct id="struct" path="fd:struct">
  192.         <fb:value id="id" path="@id"/>
  193.         <fb:value id="label" path="fd:label"/>
  194.         <fb:insert-node><fd:widgets/></fb:insert-node>
  195.         <fb:new id="widgets-class"/>
  196.       </fb:struct>
  197.     </fb:case>
  198.   </fb:class>
  199.  
  200.   <fb:class id="submit-class">
  201.     <fb:case id="submit" path=".">
  202.       <fb:insert-node>
  203.         <fd:submit/>
  204.       </fb:insert-node>
  205.       <fb:struct id="submit" path="fd:submit">
  206.         <fb:value id="id" path="@id"/>
  207.         <fb:value id="label" path="fd:label"/>
  208.       </fb:struct>
  209.     </fb:case>
  210.   </fb:class>
  211.  
  212.   <fb:class id="union-class">
  213.     <fb:case id="union" path=".">
  214.       <fb:insert-node>
  215.         <fd:union/>
  216.       </fb:insert-node>
  217.       <fb:struct id="union" path="fd:union">
  218.         <fb:value id="id" path="@id"/>
  219.         <fb:value id="label" path="fd:label"/>
  220.         <fb:insert-node><fd:widgets/></fb:insert-node>
  221.         <fb:new id="widgets-class"/>
  222.       </fb:struct>
  223.     </fb:case>
  224.   </fb:class>
  225.  
  226. </fb:context>
  227.