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.
After some thinking, all solutions have their issues.
* No javascript, no scope ID ==> only one instance per session
* No javascript, use scope ID as parameter ==> need to garbage-collect
abandoned scopes
* Use javascript ==> well, this is the issue, that Javascript has to
be turned on
To clarify the problem with the second option, using scope ID as
parameter: even if one does not use several windows, scope would be
created for every ID. So a simple click-click-click would create three
scopes, which will increase session size. These scopes should be
removed when they are not needed, but how to distinguish this? Timeout
is another solution, but what if I opened items in different windows
and need them for more than 2 minutes? Or I openened them one by one
in the same window and need old ones to be removed immediately? The
timeout is a dummy, it sucks.
Scope per window is a great thing, I like it. Can it be implemented
without Javascript? If not, than I probably can implement this scope
for Javascript-enabled browsers only. Returning to an example with a
list of items. Every item in the list would have a link. The link
would have a normal href that would open an item in the same window,
and it would also have an associated Javascript that would open an
item in a new window. This way I can ensure that multiple windows
means that Javascript is turned on. I can create Javascript hook for
"window close" event and remove a corresponding scope object on the
server, bingo. The only issue with that approach is what if an
advanced user clicks on "open in a new window" menuitem? This way
several windows are possible with no Javascript. To protect from this
I can have links that are pure Javascript with no href, but they won't
work without Javascript at all... Bummer.
So how is it implemented in Shale :) in broad terms?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]