This is what I am currently trying to do. I do not like that Wicket
creates a new instance of component each time when I navigate to it. I
this is just not true. If you navigate you are pressing links that you have created
And what you do in that link is complete up to you.
Just set a new instance instead of a class of a page.

Like you do now i think if i read this below:
started with SignIn example. I store list of "recent" pages in my own
map in the Application object. When I am about to show SignIn page I
check if instance of this class is already instantiated, and I show
this one. This works great.

But I got some problems. First, when session expires I get NPE *after*
I check instance for null. What is weird is that if I start MSIE after
I get the exception if Firefox, MSIE shows exactly same exception. So,
it may be session-related but it propagates outside of session. I
think it is strange since Application object is nested within Session
object.
What application object are you talking about?
The wicket? That one is not stored in the session!
Application is global, only one instance lives there.
If you want to share things you have to store it really in the session.


Another thing: I now need a link with initializing parameter, which
will tell Page to reset its data. I check this parameter in
WebRequestCycle or what it is called (don't have time to look in the
source right now). Parameter is checked ok, but then I want to set
"mustReset" field in the Page. I added this field to the Page class.
So, seems that it does not work, or I update a different instance.
This is what I will have to resolve.
Give a link that param.
And i do mean the Link object in java. You don't need to have it on the client side.
You shouldn't have any need to store/push information to the browser.
Just create a link that has that param that sets that param on the page in the onClick()

Basically, I want to get the same result as I have in my Struts Dialogs library:
http://struts.sourceforge.net/strutsdialogs/dialogaction-logindialogsample.html
See that link contains DIALOG-EVENT-INIT parameter, which allows to
reset the component. If you run demo you will see that I have two
types of links: to navigate to current component, and to initialize
component.
that is client side you do need that in wicket. Start thinking about Components on the java side.
Don't worry about what is on the client/browser side.


johan



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to