> 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
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
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" }
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 -
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
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
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
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