i have written plenty forms and about 99% of them have Form<Void>. models on the form are just not that useful, its the fields that care.
-igor On Fri, Aug 27, 2010 at 5:45 AM, James Carman <ja...@carmanconsulting.com> wrote: > On Fri, Aug 27, 2010 at 8:40 AM, Mike Dee <mdichiapp...@cardeatech.com> wrote: >> >> Also noticed in prior messages with similar topic that someone suggested >> using "Void" (Form<Void>). Never knew there was a Void keyword (capital V). >> Is this a recommended technique for Form (ie. Form<Void>)? > > It's certainly possible. Remember that the type of model that the > form uses would need to be a Model<Void>, though. For the most part, > your form is going to be modifying something, so it's just easier to > base your form on that type. So, you'd have, for example: > > IModel<Person> model = ...; > Form<Person> personForm = new Form<Person>("personForm", model); > personForm.add(new TextField<String>("firstName", new > PropertyModel<String>(model, "firstName")); > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org