>
> Wouldn't the below two statements act exactly the same given i have a person
> object (which i would say both acts as a model as well as an object to which
> the form data is submitted) defined in a page.
>
> add(new RequiredTextField("person.userName"));
> add(new RequiredTextField("person.userName"),new
> PropertyModel(person,"username"));

That is only true if you set a CompoundPropertyModel on the parent (or
one of the parent's parents). Btw, you'd likely let the person be the
subject of either the Propertymodel or CompoundPropertyModel.

> If TRUE, the only reason i would want to have a PropertyModel (or in other
> words any type of Model) against a page-component would be the scenario
> where the object i want to use as model is different from the one i would
> use for data-submission...Correct..?

Nope. Typical reasons to use PropertyModels explicitly is when you
don't use a CompoundPropertyModel on the parent, or when you want to
use IDs that are different from the property expressions you want the
model to work on. Also, note that you can use completely different
models as well; property models are convenient but not the only
options (as you can read in the WIKI).

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to