You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/20 06:33:04 UTC

[jira] [Commented] (WW-4210) @TypeConversion converter attribut to class

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

ASF GitHub Bot commented on WW-4210:
------------------------------------

GitHub user lukaszlenart opened a pull request:

    https://github.com/apache/struts/pull/131

    WW-4210: Type conversion class

    This PR extends existing `TypeConversion` annotation to allow define converters as a class instead of a raw string.
    
    Implements [WW-4210](https://issues.apache.org/jira/browse/WW-4210)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lukaszlenart/struts type-conversion-class

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/struts/pull/131.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #131
    
----
commit 47552bdb0673a88b0cd76cebc40f65477edd58d0
Author: Lukasz Lenart <lu...@apache.org>
Date:   2017-04-20T06:28:46Z

    WW-4210 Extends annotation to allow use class instead of string

commit 3e76564d3ce8d5b4a3938efd3a76c521eb045f38
Author: Lukasz Lenart <lu...@apache.org>
Date:   2017-04-20T06:29:24Z

    WW-4210 Supports defining converter as a class in the annotation

commit ec2412492503cdd0e90abf7f2cf2c3e50c8fa70c
Author: Lukasz Lenart <lu...@apache.org>
Date:   2017-04-20T06:29:53Z

    WW-4210 Updates tests to use the class definition instead of string

----


> @TypeConversion converter attribut to class
> -------------------------------------------
>
>                 Key: WW-4210
>                 URL: https://issues.apache.org/jira/browse/WW-4210
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Annotations
>            Reporter: lefebvre
>            Assignee: Lukasz Lenart
>             Fix For: 2.5.next
>
>
> Can you please change "converter" property type from String to class type.
> {code}
> @Conversion(conversions = { @TypeConversion(type = ConversionType.CLASS, rule = ConversionRule.PROPERTY, converter = "com.xxx.MyConverter", key = "myKey") })
> {code}
> ---->
> {code}
> @Conversion(conversions = { @TypeConversion(type = ConversionType.CLASS, rule = ConversionRule.PROPERTY, converter = MyConverter.class, key = "myKey") })
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)