In my current project I have:
10 Forms that use a CompoundPropertymodel and
5 Forms that have no model.
IMHO both Form forms :) should be easy to work with.
Regards,
Erik.
Eelco Hillenius wrote:
thats my point. you work on fields of one object, true, but it does
not necessarily have to be the form's modelobject unless you use a
compound property model. eg
Form<Void> form = new Form<Void>("form")
{
protected void onSubmit() { value = dosomethingwith(symbol); }
};
add(form);
form.add(new TextField<String>("symbol", new
PropertyModel<String>(this, "symbol")));
where [value] and [symbol] are clearly fields on the container that
parents the form. inside onsubmit i can just as easily access the
object directly without it being the model object of the form. now if
we factor out the form into a static inner or a top level class, just
like the link discussion, it becomes valuable to have the model.
Yeah, you're right actually. I realize now that I rarely use Form's
model directly. And I actually do the special stuff in the buttons
anyway.
Eelco
--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]