Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-22 Thread Eelco Hillenius
> The last remark is not clear to me, I have look into Wicket 2.0 sources. The difference between 1.x and 2.x is that in 2 you can apply generics to models and components. For example, you can now do this: public MyComponent(MarkupContainer p, IModel m) forcing on clients that a model is passed

Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-22 Thread jan_bar
Thanks Eelco for your time. I hope I get the intent even if I did not looked at Wicket 2.0. The first solution with CompoundPropertyModel is clear, I just hesitate to use the component id as the model accessor string. But my hesitation can be solved with BoundCompoundPropertyModel. The second sol

Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-22 Thread Eelco Hillenius
Take a look at how NewUserWizard of wicket-examples/wizard works. It uses itself as the model object: public class NewUserWizard extends Wizard { ... private static final List allRoles = Arrays.asList(new String[] { "admin", "user", "moderator", "joker", "slacker" }

Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-22 Thread jan_bar
Hi, I would like to see some sample too. In my opinion, the hierarchical model sample should be part of the wicket samples. We can very easy partition our pages into Panels, Borders and whatever, but what about models? They are not so easy to use. I think that a set of possible solutions (model -

Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-21 Thread Andre Matheus
Could you please explain better the option 2? If do you have an example it could be useful. Thanks. ___ André Matheus On 8/21/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Basically you have the choice between either: > 1) using observers/ event listeners for notification much like you > woul

Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-21 Thread Eelco Hillenius
Basically you have the choice between either: 1) using observers/ event listeners for notification much like you would probably do with swing; 2) use a hierarchal model that is shared between components so that any change in that model is automatically cascaded. 1) is probably more work and has th

Re: [Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-21 Thread Igor Vaynberg
usually what i do is make listeners on the page level/panel level (whatever your encapsulaion unit is) that various components trigger.for examplePage.onUserSelected(User user) {}then whatever is in charge of selecting users raises this event. if it is encapsulated on the level of the panel i somet

[Wicket-user] Wicket way of doing (inter-)component updates?

2006-08-21 Thread Jan Willem Janssen
Hi, I'm, in general, wondering what the "Wicket way" of inter-component communication would be. Or even, if there is such a way of doing this. For example, I've got a Tree, which should update a List according to a clicked tree-node (viz. a simple webmail app). The click event of the tree node