Basically, CForms can work fine without continuations - I'm using an action based system at the moment, so no continuations there.
I would very much like to see a Forms.js that allows you to use a form without continuations. I can't personally see any reason at the moment why it shouldn't be possible. Just needs some clear thinking and some javascript. I'd like to see a CForms sample that uses such a javascript model.
<aside>I'd also like to see cocoon.redirectAndWait(....), which would allow you to change the browser's URL, display a page, and then carry on where you left off. With this, and a flow CForms that doesn't require continuations, you've got a lot of power.</aside>
Regards, Upayavira
taabpr wrote:
Hi all, I cannot/don't want to use continuation (internet ), but want to use cforms with js scripts together. For now I do: In sitemap: <map:match pattern="calc_*"> <!-- Here we use the HTTP method, GET or POST, to make distinction between the initial form display and a form submit. In both cases the same publishing pipeline will be used, which is below the selector. --> <map:select type="request-method"> <map:when test="GET"> <map:call function="handleForm"> <map:parameter name="function" value="sad"/> <map:parameter name="form-definition" value="cocoon:/sad_{1}.xml"/> <map:parameter name="locale" value="{1}"/> </map:call> </map:when> <map:when test="POST"> <map:act type="handle-form-submit"> <map:parameter name="form-definition" value="cocoon:/sad_{1}.xml"/> <map:parameter name="attribute-name" value="sad"/> <map:parameter name="formhandler"
value="org.apache.cocoon.forms.samples.Form1Handler"/> <map:generate type="serverpages" src="forms/xxx.xsp"/> <map:transform type="cinclude"/> <map:serialize/> </map:act> </map:when>
and js is: function sad(form) { var model = form.getModel(); model.commodity_code = "1111111111"; form.locale = locale; cocoon.request.setAttribute("sad", form.getWidget()); cocoon.sendPage("sad-display-pipeline_" + locale.toString()); }
sendPage does not create the continuation.
But the problem appears in any repeaters. I don't know how to handle requests with action add-delete-row using flowscript. For this I use standard actions from example (see the part POST), but would prefer js. Could you tell me how to write cforms with only js scripts without continuation (would be good the have such example also in samples)? Thanks, Tom
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
