I suggest you take a look at this thread for ideas: http://www.nabble.com/Design-questions% 3A-Use-of-controllers-and-wicket-models-tf3373279.html#a9510863
There may be simpler threads, but there are some gems in here that will help you, I'm sure. Cheers, Dave On Thu, 2007-04-26 at 20:56 +0100, James Perry wrote: > I am experimenting with Wicket to use it for my dissertation. I am > developing a basic book library application. I am creating an edit > page which edits boolen values of a borrower object (isInDebt, > isAccountExpired, etc.). I tried to map it with the following code, > which is an inner-class: > > static public final class EditBorrowerForm extends Form > { > /** > * Constructor > * > * @param id > * id of form > * @param book > * Book model > */ > public EditBorrowerForm(final String id, final Borrower borrower) > { > super(id, new CompoundPropertyModel(borrower)); > > add(new Label("firstName")); > add(new Label("lastName")); > add(new Label("email")); > > // Create a required text field that edits the borrowers's > password > final TextField password = new TextField("password"); > password.setRequired(true); > final FormComponentFeedbackBorder passwordFeedback = new > FormComponentFeedbackBorder( > "passwordFeedback"); > add(passwordFeedback); > passwordFeedback.add(password); > > add(new CheckBox("enabled")); > add(new CheckBox("accountExpired")); > add(new CheckBox("accountLocked")); > add(new CheckBox("credentialsExpired")); > } > > /** > * Show the resulting valid edit > */ > public final void onSubmit() > { > //To do! > } > } > > The problem I am finding is that the checkbox component gets it model > object value from its corresponding get..() method but I want it to > get its value from is...(). Is there a way to change Wicket from > getting its is..() method rather then writing a get...() method. Is > this a correct approach or is there a better practise? > > Look forward to your advice, > > - James > ------------------------------------------------------------------------- > 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 ------------------------------------------------------------------------- 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