[
https://issues.apache.org/jira/browse/WICKET-2227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fridolin Jackstadt reopened WICKET-2227:
----------------------------------------
No, it is also called from "onComponentTag" to convert the string value of the
model object to a Boolean value.
If the type of the CheckBox is Integer the IntegerConverter is used to convert
the Integer to String, and then the CheckboxConverter to convert the String to
Boolean.
So it is not possible to set the type of Checkbox to Integer.class and use the
value "1" as true.
The CheckboxConverter in this case is used before any String ist send back from
the browser!
> CheckBoxConverter does not support Integer type
> -----------------------------------------------
>
> Key: WICKET-2227
> URL: https://issues.apache.org/jira/browse/WICKET-2227
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Fridolin Jackstadt
> Assignee: Igor Vaynberg
>
> Maybe it is possible to change the function?
> Is it possible to convert "1" to true? this would enable support for
> Integer-Models
> public Object convertToObject(String value, Locale locale)
> {
> if ("on".equals(value) || "true".equals(value) ||
> "1".equals(value))
> {
> return Boolean.TRUE;
> }
> else
> {
> return Boolean.FALSE;
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.