[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-dev
Subject:    [jira] [Commented] (WW-3871) TypeConversion annotation support improvement
From:       "Lukasz Lenart (JIRA)" <jira () apache ! org>
Date:       2013-01-28 20:23:14
Message-ID: JIRA.12606073.1346763094466.202927.1359404594012 () arcas
[Download RAW message or body]


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

Lukasz Lenart commented on WW-3871:
-----------------------------------

Could you prepare an example, Maven based?

I've tested with your code snippet and everything works, you don't have to specify \
@TypeConversion at all, by default Struts2 will convert and create List and User \
without any additional code.

ConversionRules should be removed, but thus can be done with new major version -> 3.x
                
> TypeConversion annotation support improvement
> ---------------------------------------------
> 
> Key: WW-3871
> URL: https://issues.apache.org/jira/browse/WW-3871
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Convention
> Affects Versions: 2.3.4.1
> Reporter: Pavan Ananth
> Fix For: 2.3.9
> 
> 
> The annotation support for TypeConversion in Struts 2 is too literal an \
> interpretation of the XML support. For instance, I am required to supply this if I \
> have choose the CreateIfNull feature at a property level : \
> @TypeConversion(key="CreateIfNull_users", rule=ConversionRule.CreateIfNull, \
> value="true") List<User> users;
> Given that the rule is CreateIfNull, the key can be constructed implicitly using \
> property name - why is it asked of an user to type in the full key.  This holds \
> good for the other supported ConversionRules as well

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic