DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Some components do not even work without this, like wicket.markup.html.link.Link, which has abstract method onClick(), or wicket.markup.html.list.ListView that has abstract method populateItem().
Component wicket.markup.html.form.DropDownChoice is a non-abstract component, but by extending it, we can alter its behaviour. For example, look at:
| Code Block |
|---|
add(new DropDownChoice("venueSelect",
new PropertyModel(this, "currentVenue"), getVenueDao().findVenues())
{
protected boolean wantOnSelectionChangedNotifications()
{
return true;
}
});
|
By overloading method wantOnSelectionChangedNotifications(), and have it return true (instead of false which is the default), an onchange javascript event handler will be generated, so that on each new selection of the dropdown, a roundtrip will be made to the server, updating the model of the dropdown component. And if you used your models smart enough, this can have the effect that other components have an updated rendering as well.
...
and do something nice in the ''onSelectionChanged// () event handler.
By making use of models that use e.g. a shared property, we can do all kinds of neat things. Here is an example:
...