I guess you mean "only try to convert when there is a type set" ?

Checkbox is abit of a bad example, A DropDown or anohter Choice is a better one

Converter is Type conversion String to Date or Integer or what ever.

But convertValue (used in the Choice classes) is not type conversion
But it is more a Lookup conversion (or how do i say this better)
The input/request value is an id and for that id a object is lookupped..
The normal converter can never do that. Because it doesn't have any context
(The Choices List and the IChoiceRenderer in this case)

But as i said we always try to use the converter of the component.
But for this particulair case we don't have the component.

Maybe we should have a getRootObject(Component) and setRootObject(Component) methods
in the ICompoundModel interface, So that we can give the component to the model.

johan




On 5/10/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
Yeah, I'm not totally crazy about that either. But the fact that we
only try to convert when there is a converter set comes from:
* some components, like CheckBox use their own kind of conversion, and
thus override the convertValue method
* some users strongly objected against Wicket always trying to use
converters. In older Wicket versions, it was integrated in it's
adoption of OGNL. But users wanted less magic.

Eelco


On 5/10/06, Ittay Dror < [EMAIL PROTECTED]> wrote:
> i created a TextField, without setting its type, but with overriding of getConverter(), i also used a CompoundPropertyModel
>
> what happened is that this converter was not used in convert(), but was used by the property resolver. inside the PropertyResolver code, it threw an exception, which, was rethrown as InvocationException, which was considered unexpected, and so the page was redirected to the error page (rather than showing a conversion error)
>
> ittay
>
> --
> ===================================
> Ittay Dror
> Chief architect, openQRM TL,
> R&D, Qlusters Inc.
> [EMAIL PROTECTED]
> +972-3-6081994 Fax: +972-3-6081841
>
> http://www.openQRM.org
> - Keeps your Data-Center Up and Running
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to