Your error description is really confusing. It might help if you can re-read and re-phrase it.

Just some comments:
The call of the flowscript function can not work as it would not lead to a reload on client side - simply the client's request would be missing. The reason that it ends with an exception "Pipeline has already been processed for this request" is due to the fact that you have already handled the request of "save data in popup" and so sent a response and now you try to send a second response. What you need to do is a bit more client side javascript. onclose() in the popup you need to do a refresh in the main window. Instead of most simple parent.location.reload() it would be better to submit the form in the main window. I would add a refresh button for this.


Joerg

On 07.05.2004 14:18, Samuel Tribehou wrote:

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