Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.
The following page has been changed by CombinationalLogic: http://wiki.apache.org/cocoon/CFormsFAQ ------------------------------------------------------------------------------ A. Call your custom flowscript function from the sitemap. The sitemap and funciton might look as follows: '''Flow script:''' - + {{{ function myFormFlow(){ - var documentURI = "path/to/your/xml_do_to_bind_to.xml" + var documentURI = "path/to/your/xml_do_to_bind_to.xml"; var form = new Form("path/to/your/form_def.xml"); var dom = loadDocument(documentURI); var viewData = new Object(); @@ -45, +45 @@ viewData.selectOptionList.push( {value: "1", label: "option 1" }); form.createBinding("path/to/your/form_bind.xml"); form.load(boundDoc); - form.showForm(elem+"form-display-pipeline",viewData ); + form.showForm("form-display-pipeline",viewData ); form.save(boundDoc); ... } + }}} '''Site Map:''' + {{{ <map:match pattern="the_form"> <map:call function="myFormFlow"/> </map:match> - + }}} '''Segment of form def field with options defined in flow:''' + {{{ <fd:field id="class" required="true"> <fd:label>Select an option:</fd:label> <fd:datatype base="string"/> - <fd:selection-list dynamic="true" type="flow-jxpath" list-path="classList" value-path="value" label-path="label"/> + <fd:selection-list dynamic="true" type="flow-jxpath" list-path="selectOptionList" value-path="value" label-path="label"/> </fd:field> + }}}
