|
in cocoon's inbuilt example: http://localhost/samples/woody/form_model_gui.flow
first create a form===> binding it===> load data to it
from a file ===>invoke a pipeline to show this form by a
template
following is some code extracted from the data
file,
1. it use namepace of wd: !!
why???????
<?xml version="1.0"
encoding="UTF-8"?>
<wd:form xmlns:wd="http://apache.org/cocoon/woody/definition/1.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"> <wd:widgets> <wd:class
id="samp-class">
<wd:label>Sample Class</wd:label> <wd:widgets> <wd:booleanfield id="samp-class-booleanfield"><wd:label>Sample Class BooleanField</wd:label></wd:booleanfield> <wd:field id="samp-class-field"><wd:label>Sample Class Field</wd:label></wd:field> </wd:widgets> </wd:class> <wd:struct
id="samp-struct">
<wd:label>Sample Struct</wd:label> <wd:widgets> <wd:booleanfield id="samp-struct-booleanfield"><wd:label>Sample Struct BooleanField</wd:label></wd:booleanfield> <wd:field id="samp-struct-field" required="true"><wd:label>Sample Struct Field</wd:label></wd:field> </wd:widgets> </wd:struct> <wd:union
id="samp-union">
<wd:label>Sample Union</wd:label> <wd:widgets> <wd:booleanfield id="samp-union-booleanfield"><wd:label>Sample Union BooleanField</wd:label></wd:booleanfield> <wd:field id="samp-union-field"><wd:label>Sample Union Field</wd:label></wd:field> </wd:widgets> </wd:union> |
