You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "sebastien b. (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/03/21 10:23:39 UTC

[jira] [Issue Comment Edited] (WW-3584) convertToString in custom StrutsTypeConverter not called for multiple-valued tags (checkboxlist and select)

    [ https://issues.apache.org/jira/browse/WW-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234216#comment-13234216 ] 

sebastien b. edited comment on WW-3584 at 3/21/12 9:21 AM:
-----------------------------------------------------------

The bug is solved for me with the checkboxlist.ftl file corrected.

I modified this file only to add the css render.

Thanks !
CCordially.
                
      was (Author: sebmatrix):
    Just the precedent file with re-integration of css render.
                  
> convertToString in custom StrutsTypeConverter not called for multiple-valued tags (checkboxlist and select)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3584
>                 URL: https://issues.apache.org/jira/browse/WW-3584
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.2.1.1
>            Reporter: Antonino Virgillito
>            Assignee: Maurizio Cucchiara
>             Fix For: 2.3.x
>
>         Attachments: checkboxlist.ftl, checkboxlist.ftl, multivalueTest.zip
>
>
> I wrote a custom converter to map a list of custom type (List<MyBean>) to a s:checkboxlist tag. When I submit the form the convertFromString() method is called, so I have the list correctly populated with the selected values. 
> The problem is that it doesn't work the other way: when I try to pre-populate the form from the values in the list, the tag is always empty, because the convertToString() method is never called. Same happens for s:select with multiple="true". 
> I think it is a bug because if I change the tag to s:textfield, mapped to the same list, convertToString() is called and text box is populated. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira