On 8/31/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> 
> Oops. Sent to MyFaces instead of Struts. Sorry.
> 
> ---------- Forwarded message ----------
> From: Sean Schofield <[EMAIL PROTECTED]>
> Date: Aug 31, 2005 5:37 PM
> Subject: [shale] Why does <subdialog> data disappear when terminating?
> To: MyFaces Development <dev@myfaces.apache.org>
> 
> 
> Craig,
> 
> I was wondering about the decision to "pop" the data when a subdialog
> ends. I'm sure there are use cases where this would be helpful but I
> can think of some where this is a major PITA.
> 
> My use case is that the dialog is running in a seperate window and
> eventually the date from my dialogs needs to be dumped back to the
> javascript object. Basically I am binding to #{dialog.data} with all
> of my fields but I'm not really updating anything in the database
> until after the dialog terminates.
> 
> What about making it an option to retain the same data object for all
> positions in subdialogs?


The motivation for getting rid of the data at the end of a subdialog is 
twofold:

* Simulate a scope "longer than a request but shorter than a session"
so that the application doesn't have to explicitly manage the cleanup
(since the servlet container does not provide such mechanisms).

* Treat a subdialog as a black box rather than something I can sort of
peer into and then pull out results.

In particular, can't you ensure that an action state prior to the exit state 
of the subdialog caches away anything you want to save? That puts the 
responsibility on the subdialog, instead of the caller of the subdialog, to 
do "post processing".

Craig

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

Reply via email to