On 9/15/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 9/15/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> On 9/14/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> > In Shale, the closest analog to this is Dialog scope, and we're building
> the
> > concept of a scope instance per window/frame, independent of what that
> > window/frame is actually doing.
>
> I believe this requires usage of Javascript? So you would have
> listeners when a window is created and closed, right? I want to have a
> solution that works without Javascript.
Currently this doesn't take any JavaScript ... but note the code I'm
talking about here is currently in the Shale sandbox if you want to look
further at it. It will get merged back into the main codebase later.
The basic idea is we rely on the fact that JSF saves and restores the
component state for us, so it uses a PhaseListener to store away the
conversation id as part of the component tree (when the page is rendered),
and restore the corresponding state (when the subsequent postback occurs).
In our case, it just exposes the "dialog context" for the conversation on
the current view as a request scope attribute ... I don't personally see a
use case for registering listeners on that conversation, but I suppose it
could be done.
Does the above mean that the server does not get notified when a
window is closed? So the session (or wherever the dialog context is
stored) is not cleaned up immediately when a window is closed? Do you
have to use timer for removing unneeded dialog contexts? Or have you
opted for something else?
How do you bind an ID to a window? Of course you can stick it into a
link, but what if I open a link that is not intended for a new window,
with "open in a new window" command from a browser? I will not get a
window ID, right?
Cookies... I have to look again at how cookies work, but I always
thought that all cookies are shared by all browser windows, so I
cannot have one cookie assigned to one window, and another cookie
assigned to another window.
I should check the source code, but I would appreciate a high-level
two-liner before digging in :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]