Erik van Oosten wrote:

Excellent. This is exactly the kind of stuff I was waiting for :)

Could you write 2 lines for the choise components on how to read the selection from the model ?

That is the thing: the model is your POJO and the choice components set the value on your object. I'll add it though. I think that is pretty unclear at the moment. The following text is something I just wrote:

The xxx component will set the selected value in your model object. Say you have a dropdown with all states of the US, and you want bind this to the state property of an address object bound to your Person object. In Java this is something like:

public MyForm(String id, IModel model, IFeedback feedback) {
   super(id, model, feedback);
   List states = getStatesFromSomewhere();
add(new DropDownChoice("states", new PropertyModel(model, "address.state"), states));
}
protected void onSubmit() {
   // when the user has selected a value in the states dropdown
   // the state property of the address object of the person has
   // now been set to the selected state
}

Martijn


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to