[ 
https://issues.apache.org/jira/browse/MYFACES-1165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526397
 ] 

Paul Pogonyshev commented on MYFACES-1165:
------------------------------------------

Regardless of whether it is in JSF specification, it is supported by MyFaces:

  <converter>
    <converter-id>format-post-id</converter-id>
    
<converter-class>com.enw.myfaces.converter.ObjectIdConverter</converter-class>

    <property>
      <property-name>type</property-name>
      <property-class>java.lang.String</property-class>
      <default-value>post</default-value>
    </property>
  </converter>

This works fine as long as I don't create two converters using the same class.  
Current MyFaces behaviour is completely non-intuitive and therefore a bug.  I 
registered this way two converters from the same class, but with different type 
property and later couldn't understand why using the right converter gave me an 
exception.  Turned out, MyFaces used configuration for a _different_ converter 
with the same class.


> Properties for Converters by class instead of by id
> ---------------------------------------------------
>
>                 Key: MYFACES-1165
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1165
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 1.1.1
>            Reporter: Bjarne Hansen
>            Priority: Minor
>
> When a converter is created it has its properties set from the configuration 
> by converter class and not by converter id. This means that it is not 
> possible to have different converters (id) implemented by the same class with 
> different configurations specified in the faces configuration file.  

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

Reply via email to