In your form:
public MyForm(String id, IModel model)
{
super(id, new CompoundPropertyModel(new Person()));
...
}
public void onSubmit()
{
Person newPerson = (Person)getModelObject(); // by now this object is
'filled' using your form components
getPersonList().add(newPerson);
// now navigate to another page or set a new person to edit like
setModel(new CompoundPropertyModel(new Person()))
}
Eelco
David Liebeherr wrote:
I have a Page with a Form to edit an Person object.
The Person object is always part of a People-List.
The Form uses a CompoundPropertyModel.
It works fine when i edit a given Person object.
So my question is now:
How can i implement it that the CompoudPropertyModel adds a new Person
object to the People-List when i use it for editinig a new Person?
Thanks,
Dave
-------------------------------------------------------
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
-------------------------------------------------------
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