Hi,
I'm loving Wicket, but still have a bit to learn. I didn't find any answers
when searching for an answer to my questions, so here they are.
BTW, I'm using Wicket 1.3 as built from SVN (up to date as of 6/23).
I have a panel that I'd like to include in multiple _different_ forms. The
panel defines some form elements that I'd like to be processed by the
enclosing form.
My use case is basically this: The panel contains contact info (name,
address, etc). I'd like to include this panel in both a registration form
and later, in a user profile where the user can edit their contact info.
1) What is the best way to define this Panel? My constructor currently
looks something like the following. Is this the correct way of solving
this? An issue I have with this is that this panel makes some assumptions
about the form's model object.
public ContactInfoPanel(String id, Form form) {
super(id, form.getModel());
BoundCompoundPropertyModel userModel =
(BoundCompoundPropertyModel)form.getModel();
Component firstNameField = userModel.bind(new
RequiredTextField("firstName"), "path.to.firstName");
add(firstNameField);
}
2) Supposing I wanted to add inter-field validation for fields contributed
by this panel, what is the best way to do that?
Any help would be greatly appreciated.
Thanks,
Erik
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user