Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Thomas Mäder
Doesn't that sound like session state? Thomas On Sun, Feb 1, 2009 at 7:09 PM, Per Newgro per.new...@gmx.ch wrote: Hi Uwe, until now i can do everything :-). All my experiments with ldm failed so far. I have to store the states. But in DB? It's heavyweight for me. Maybe i should try a

Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Matej Knopp
Don't use loadabledetachablemodel for this. Forget Wicket model implementations. Just look at the IModel interface. It has 3 methods, each of them simple to implement and you get most control of where the object is pulled from and where it is stored. -Matej On Sun, Feb 1, 2009 at 7:09 PM, Per

Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Matej Knopp
Either there or in your session's subclass constructor. -Matej On Mon, Feb 2, 2009 at 7:25 PM, Per Newgro per.new...@gmx.ch wrote: Thanks Thomas and Matej, storing state in session sounds natural in your explanations. It comes into my mind, that i could initiate the instance in

Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Thomas Mäder
Well, Wicket has a Session Object. You can create your own subclass and store stuff in there (WebApplication.newSession(...). If you want to share state between pages, it's a natural place to put the state. One question you can ask yourself is: how many instances of that panel would I have? If the

Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Newgro
Hi Thomas, can you please explain this a bit. What do you mean by session state. How can i use session state in my context? Cheers Per -- View this message in context: http://www.nabble.com/What-are-the-consequences-on-sharing-panels-between-pages--tp21772949p21787239.html Sent from the

Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Matej Knopp
Sharing wicket components between page is a very bad idea. You are about to open large can of very nasty worms. Just don't do it. Proper way is to externalize the navigation state from your component and store it in session. Write couple of detachable models that do that. -Matej On Sun, Feb 1,

Re: What are the consequences on sharing panels between pages?

2009-02-02 Thread Per Newgro
Thanks Thomas and Matej, storing state in session sounds natural in your explanations. It comes into my mind, that i could initiate the instance in Application.newSession(). Is this the right place for this task? The the navigational panel could extract an initialized model instance from the

Re: What are the consequences on sharing panels between pages?

2009-02-01 Thread Uwe Schäfer
Per Newgro schrieb: i would like to share (instance reuse) a navigation panel in my page flow. I try to achieve that so i can keep the current state of navigation components. It's a clone of the windows xp sidebar in system controls. sounds awful. would not do that. being deserialized from

Re: What are the consequences on sharing panels between pages?

2009-02-01 Thread Per Newgro
Hi Uwe, until now i can do everything :-). All my experiments with ldm failed so far. I have to store the states. But in DB? It's heavyweight for me. Maybe i should try a cookie based solution. Thanks for your doubts Cheers Per