[
https://issues.apache.org/struts/browse/WW-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rainer Hermanns resolved WW-2339.
---------------------------------
Resolution: Fixed
Fix Version/s: (was: Future)
2.1.3
Assignee: Rainer Hermanns
This issue seems to be resolved by Don's patch in rev655721
> empty checkbox list results in "Invalid field value for field" error when
> using Collection or array containing non-boolean values.
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: WW-2339
> URL: https://issues.apache.org/struts/browse/WW-2339
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.0.11
> Environment: Tomcat 6, XWork 2.0.4
> Reporter: Mike Calmus
> Assignee: Rainer Hermanns
> Fix For: 2.1.3
>
> Attachments: CheckboxInterceptor_r643532_patch.txt
>
>
> I have an action that has a "selectedPageItems" element of type List<Long>.
> Using a JSp containing several checkboxes with value attributes of type Long,
> I receive an "Invalid field value for field" error when no items are selected.
> The CheckboxInterceptor class has the following code block:
> // is this checkbox checked/submitted?
> if (!parameters.containsKey(name)) {
> // if not, let's be sure to default the value to false
> newParams.put(name, uncheckedValue);
> }
> This causes a single boolean (or String) value to be added to the parameter
> list when no values are selected. This works fine if the Collection holds
> String or boolean values. However, in my situation the value can not be
> assigned to the Collection, giving the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.