On Tue, Jul 1, 2008 at 11:28 PM, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > On Tue, Jul 1, 2008 at 11:09 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: >> if we ungenerify Link, should we also ungenerify Form? seems like the >> exact same kind of usecase. > > Imho, generic forms make more sense, as you'd typically work on fields > (with formcomponents) of one object (the model object of the form)
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. > Anyway, not a big deal really. If you feel Link is better generified, > I'm cool with it. i agree that its no big deal, i am just trying to figure out some sort of guidelines for when we do include the type and when we dont. if we say that we only include the type when the component uses its model then neither Link nor Form qualify. in fact neither will ListItem. only things like ListView and FormComponents will qualify. -igor --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]