Hello Cocooners,


[Cocoon Version 2.1.6]



i have a question about the binding-framework. right know i use it like this:



---------Sitemap---------------

<map:match pattern="binding">

   <map:call function="handleForm">

      <map:parameter name="function" value="myBinding"/>

      <map:parameter name="form-definition" value="form.xml"/>

      <map:parameter name="bindingURI" value="binding.xml"/>

   </map:call>

</map:match>

-------------------------------







---------Flowscript ------------

function myBinding(form) {

   var bean = new Packages.foo.bar.cocoonBean();

   form.load(bean);

   form.showForm("registration-display-pipeline");

   form.save(bean);

   cocoon.sendPage("registration-success-pipeline", {"model": bean});

}



-------------------------------



that works fine so far!

*****My question:*************



how does " form.createBinding("my_binding.xml"); " 

(which i found in the flowscript of the samples folder) work? Is it 

diffrent/better than my version? If i use form.createBinding

do i still have to use the same sitemap as above?



I am asking all this because I have a longer Flowscript that

switches (switch/case block) over serval forms and I wonder how 

to implement a flowscript and binding with ore than one form.



Thank you very much for your help!

phil


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to