[ 
https://issues.apache.org/jira/browse/WICKET-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Benda updated WICKET-330:
--------------------------------

    Attachment: checkbox-getModelValue.patch

> CheckBox incorrectly converts its model value when a custom Boolean converter 
> is installed
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-330
>                 URL: https://issues.apache.org/jira/browse/WICKET-330
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 2.0
>            Reporter: Martin Benda
>         Attachments: checkbox-getModelValue.patch
>
>
> When I use a custom localized Boolean converter (using my custom 
> IConverterLocator) that converts "Ano" to true and "Ne" to false (Czech words 
> for "yes" and "no") the CheckBox with 'true' getModelObject() will render 
> unchecked. The problem is that CheckBox uses Strings.isTrue() to convert a 
> value returned by getModelObjectAsString() which uses converters. The result 
> is that true is incorrectly converted to false...
> true -> convertToString() -> "Ano" -> Strings.isTrue() -> false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to