You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Val Blant (JIRA)" <de...@myfaces.apache.org> on 2008/10/07 19:18:44 UTC

[jira] Created: (MYFACES-2007) Converters are not created properly when target class is both, an enum and implements an interface

Converters are not created properly when target class is both, an enum and implements an interface
--------------------------------------------------------------------------------------------------

                 Key: MYFACES-2007
                 URL: https://issues.apache.org/jira/browse/MYFACES-2007
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.2.4
            Reporter: Val Blant


This patch fixes the following situation:
 - A converter is bound in faces-config.xml to an interface type (ex. EnumCoded). 
 - There is an enum class that implements EnumCoded, like this:

public enum PickListActionType implements EnumCoded { ..... etc... }

 - There is a converter called a GenericEnumTypeConverter, which knows how to deal with these and is declared like this:
 <converter> 
    <converter-for-class>EnumCoded</converter-for-class> 
    <converter-class>GenericEnumTypeConverter</converter-class> 
 </converter>

 - Right now the converter picked by MyFaces is EnumConverter instead of my GenericEnumTypeConverter, b/c the fact that my target class is an enum takes precedence over the fact that it implements EnumCoded interface.

This patch fixes the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACES-2007) Converters are not created properly when target class is both, an enum and implements an interface

Posted by "Val Blant (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Val Blant updated MYFACES-2007:
-------------------------------

    Status: Patch Available  (was: Open)

> Converters are not created properly when target class is both, an enum and implements an interface
> --------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2007
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2007
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.4
>            Reporter: Val Blant
>
> This patch fixes the following situation:
>  - A converter is bound in faces-config.xml to an interface type (ex. EnumCoded). 
>  - There is an enum class that implements EnumCoded, like this:
> public enum PickListActionType implements EnumCoded { ..... etc... }
>  - There is a converter called a GenericEnumTypeConverter, which knows how to deal with these and is declared like this:
>  <converter> 
>     <converter-for-class>EnumCoded</converter-for-class> 
>     <converter-class>GenericEnumTypeConverter</converter-class> 
>  </converter>
>  - Right now the converter picked by MyFaces is EnumConverter instead of my GenericEnumTypeConverter, b/c the fact that my target class is an enum takes precedence over the fact that it implements EnumCoded interface.
> This patch fixes the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2007) Converters are not created properly when target class is both, an enum and implements an interface

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711979#action_12711979 ] 

Matthias Weßendorf commented on MYFACES-2007:
---------------------------------------------

can you add this to myfaces 2.0 ?

> Converters are not created properly when target class is both, an enum and implements an interface
> --------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2007
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2007
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.4
>            Reporter: Val Blant
>            Assignee: Leonardo Uribe
>             Fix For: 1.2.7-SNAPSHOT
>
>         Attachments: myfaces-2007.patch
>
>
> This patch fixes the following situation:
>  - A converter is bound in faces-config.xml to an interface type (ex. EnumCoded). 
>  - There is an enum class that implements EnumCoded, like this:
> public enum PickListActionType implements EnumCoded { ..... etc... }
>  - There is a converter called a GenericEnumTypeConverter, which knows how to deal with these and is declared like this:
>  <converter> 
>     <converter-for-class>EnumCoded</converter-for-class> 
>     <converter-class>GenericEnumTypeConverter</converter-class> 
>  </converter>
>  - Right now the converter picked by MyFaces is EnumConverter instead of my GenericEnumTypeConverter, b/c the fact that my target class is an enum takes precedence over the fact that it implements EnumCoded interface. This is incorrect.
> This patch fixes the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACES-2007) Converters are not created properly when target class is both, an enum and implements an interface

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated MYFACES-2007:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.7-SNAPSHOT
         Assignee: Leonardo Uribe
           Status: Resolved  (was: Patch Available)

Patch checked and test corrected (EnumCodedTestConverter not included on the patch).

Thanks to Val Blant for provide this patch.

> Converters are not created properly when target class is both, an enum and implements an interface
> --------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2007
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2007
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.4
>            Reporter: Val Blant
>            Assignee: Leonardo Uribe
>             Fix For: 1.2.7-SNAPSHOT
>
>         Attachments: myfaces-2007.patch
>
>
> This patch fixes the following situation:
>  - A converter is bound in faces-config.xml to an interface type (ex. EnumCoded). 
>  - There is an enum class that implements EnumCoded, like this:
> public enum PickListActionType implements EnumCoded { ..... etc... }
>  - There is a converter called a GenericEnumTypeConverter, which knows how to deal with these and is declared like this:
>  <converter> 
>     <converter-for-class>EnumCoded</converter-for-class> 
>     <converter-class>GenericEnumTypeConverter</converter-class> 
>  </converter>
>  - Right now the converter picked by MyFaces is EnumConverter instead of my GenericEnumTypeConverter, b/c the fact that my target class is an enum takes precedence over the fact that it implements EnumCoded interface. This is incorrect.
> This patch fixes the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.