Andrew Madu wrote:
Nope. You have 2 files for each form, a definition and a template. Optionally you can have a binding. Also, you need a pipe in the sitemap to show the form. In _javascript_ you use : var form = new Form("definition"); form.showForm("pipe", {"key: variable}); in this case, you are not using a binding. So, this in javaflow is : FormInstance fi = new FormInstance("definition"); fi.show("pipe", new VarMap().add("key", variable)); The fi.createBinding is used to assign a binding to the form instance. fi.load is used once you have a binding to "transfer" values from a bean or xml document to widget fields, while fi.save transfers values from the form widgets to the bean or document. fi.getModel() returns a org.apache.cocoon.forms.formmodel.Form, that is the underlying form object. So you can do : Form form = fi.getModel(); form.lookupWidget(.....).getValue(); etc..etc.. Simone -- Simone Gianni |
- Re: Cast type in flowscript [ Javaflow] Simone Gianni
- Re: Cast type in flowscript [ Javaflow] Andrew Madu
- Re: Cast type in flowscript [ Javaflow] Simone Gianni
- Re: Cast type in flowscript [ Javaflow] Andrew Madu