Hello there.
I'm a new cocoon user, so please bear with my ignorance ;)

Here is my problem :

Say I have page which contains a main form. This form contains not only traditionnal form elements, but also some data displayed as lists which is gathered form a database.
To add/remove items from those lists, there are links which opens little forms in a popup window. Once those forms are submitted, the popup closes and the user does things with the main form again.
My problem is, how can I redisplay the main form with the actualized data ?


What I'd need to do is first gather the main form data and put it in a bean, then display the popup, add the data to the bean once this form is sumbmited,
and redisplay the main form with the actualized data.


So, when the user opens a popup, a flowscript function is called to display and process this form.
- First problem : it seems I can't gather the main form data from here with cocoon.request.get() because it's not the same request.
- Second problem : How can i reload the main form with actualized data from here ?
If i try to call the flowscript function which displays the main form, i get an error : "Pipeline has already been processed for this request"
So i thought maybe i could invalidate the continuation started the first time the form is displayed, then be able to redisplay the main form without error. But I can't get that to work either..
(third problem)
I tried to to it like that :


var continuation = cocoon.sendPageAndWait ("mainform");
cocoon.session.setAttribute ("continuation", continuation);


Then in the flowscript function which displays the popup:
var continuation = cocoon.session.getAttribute("continuation");
print ("continuation = " + continuation); // displays "continuation = [object FOM_WebContinuation]"
continuation.invalidate(); //NPE ??


So, what do you guys suggest ?
The third problem probably shows that i don't really understand how continuations work and how they should be used ;)
But how would you solve my first two problems ? There must be a way to do it i suppose ?






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



Reply via email to