I think I understand your explanations yet I struggle to see how scenario I
was describing is optimization-only. Consider these scenarios:

Shopping w/o signing in.
1.I go to amazon.com and fill my shopping cart with stuff without signing
in. 
2.I navigate away to somewhere else and short time later (< HttpSession
timeout) type in 'amazon.com' to go back. At this point I'd still expect to
see my cart's content.

My Home Page is a portal
1. My home page is my.yahoo.com. When I launch my browser I get
authenticated via a previously-stored cookie.
2.During the course of the same browser session I can navigate away to
another site and then hit CTRL+H to go to my home page again.
3.As I land on my.yahoo.com seems that I am *not* re-authenticated from a
persistent cookie - instead a cookie issued in #1 is used to locate my
server-side state.

In both of these scenarios NOT retrieving state from steps #1 is not merely
a non-optimization - but 
unexpected behavior. Do you agree? 

How would a Wicket-based app address these scenarios?

If there is no out-of-the-box support for the above would something like the
following be reasonable:

1. say my home page is defined by Home.java w/ mountPath of /Home. So going
to app root:
host/MyApp/app/ would redirect to host/MyApp/app/Home.1

2. User does something to alter state of this page -> redirected to
host/MyApp/app/Home.2

3. User navigates away and returns by issuing /MyApp/app/
As it stands, seems like Wicket would:
-'new' Home.java
-redirect to /MyApp/app/Home.3 (not 2)

But what would instead, given Home.class we'd find the latest stored
instance in SessionStore. If does not exist -> create new; else redirect to
that one. Thus in step 3 we'd find and redirect to /Home.2.

Would that not address above scenarios? If it would, why would this not make
sense as default behavior?

thanks again,

-nikita



Eelco Hillenius wrote:
> 
> 
>> How can I get Wicket to reuse object from #2 in step 3?
> 
> You typically don't unless you have a very specific reason for it. But
> if you want, you can implement a custom page factory for instance.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/webpage-instance-scope--tf4564224.html#a13049622
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to