On 11/15/06, Sean Schofield <[EMAIL PROTECTED]> wrote:
> IIRC, you filed some RFE requests against dialog for a similar use case, and > we listened :-). You can fake a restart by programmatically stopping the > current dialog, and then programmatically starting a new one. Does that do > the trick for you? I guess this means an action method that returns "dialog:BoatsDialog" after killing the dialog instance? Otherwise how would the user be able to "stop" the dialog simply by clicking a link?
Returning "dialog:BoatsDialog" would certainly do for the "start over" part. You still need to stop the current one first, though ... the dialog manager only supports one active dialog per view (i.e. window or frame).
To do this, simply gain access to the DialogContext object (its session > scoped under key "dialog") and call stop(). Then get the > DialogContextManager (session scoped under key Constants.MANAGER_BEAN) and > call create(). Yes I saw this in the docs. Its definitely an improvement but I stil think the default (resume the dialog) can be a bit unexpected.
It could also be we should consider this scenario (trying to start a second dialog when there's an active one) to be an error condition, and throw an exception or something. I'm
also running into problems with the MyFaces scrollable datatable. If you click on "page 2" nothing happens. I take it the NavigationHandler is swallowing the null nav outcome still?
Shouldn't be ... o.a.s.dialog.faces.DialogNavigationHandler delegates to the original handler when (a) there is no active dialog, or (b) the logical outcome is null (around line 130)
Craig Sean
Craig