Re: [Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Eelco Hillenius
I haven't followed the whole discussion (lousy connectivity here in my hotel), but I'd like to give a note on one thing. While I started out using 'pull' models all the time, and letting all dynamic parts of the page - also heavily depending on the visible flag - I came back from that a bit. Someti

[Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Anders Peterson
Juergen Donnerstag wrote: What do you normally do? Having a panel that, in the same page, should display different things depending on what the user does must be a common design pattern. create different panels and enable/disable them. Say you have a list of Client objects displayed in one

Re: [Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Juergen Donnerstag
On 8/23/05, Anders Peterson <[EMAIL PROTECTED]> wrote: > Juergen Donnerstag wrote: > > > I'm not very fond of replacing the model object, but I guess sometimes > > it is the only or the better choice. > > What do you normally do? Having a panel that, in the same page, should > display different t

[Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Anders Peterson
Juergen Donnerstag wrote: I'm not very fond of replacing the model object, but I guess sometimes it is the only or the better choice. What do you normally do? Having a panel that, in the same page, should display different things depending on what the user does must be a common design patter

Re: [Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Juergen Donnerstag
I'm not very fond of replacing the model object, but I guess sometimes it is the only or the better choice. I do not know your application, but I guess I would go for a single model which contains all form component, whether set visible or not. And on submit propagate the information into proper bu

[Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Anders Peterson
I think it should be possible to create *PropertyModels with a null model argument - it would make things a lot easier. Getting the various properties should return null if the model is null, and corresponding labels, textfields or whatever are left empty. /Anders Anders Peterson wrote: Tha

[Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Anders Peterson
Thanks for answering! This is the route I've taken, but when/where/how do I create the models? Should I create the model in the initModel method - I trust it is not called as long as the component is invisible. Is replacing a model's object a "normal" thing to do? /Anders Juergen Donnerstag

Re: [Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Juergen Donnerstag
You could use setVisible(true/false). Create your markup and panel class with all the different data, assign a wicket:id to all tags to be either visible or not and control visibility by your java code. Juergen On 8/23/05, Anders Peterson <[EMAIL PROTECTED]> wrote: > Here's a more specific case..

[Wicket-user] Re: Pattern to update reusable panels

2005-08-23 Thread Anders Peterson
Here's a more specific case... A page conatins a panel. That panel should display different data depending on what the user does/selects in the main page, and initially there is nothing to display. How is something like this intended to be done? Is there an example of this? /Anders Anders P