Paul Bors wrote:
> I would suggest overriding FormComponentPanel#convertInput() only if your
> domain object can't be easily converted by Wicket given the model you have.
> 
> If you're using CompoundPropertyModel and set the model on your
> FormComponentPanel then your TextField ID and type should be all you need
> for wicket to know which getter/setter to call.

Really? That's not possible in an 1.4-based application, IMHO.

FormComponentPanel is a FormComponent, i.e., it participates in
conversion, validation, and update Model. When that
FormComponentPanel has an associated model, e.g., a
CompoundPropertyModel, its getInputAsArray() will return null, null
will be stored as convertedInput, and updateModel() will set the
CompoundPropertyModel's object to that null value.

When sub-widgets of a FormComponentPanel do all the work necessary,
and the FormComponentPanel has a model of its own, I often override
updateModel() to be an empty method, to prevent the behavior named
above from happening.

Best,
        Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to