cancel
Showing results for 
Search instead for 
Did you mean: 

Association on cm:person

jmliege
Champ in-the-making
Champ in-the-making
Hi,

I'm currently trying to associate a cmSmiley Tongueerson to a specific type.


       <type name="coj:registry_doc">
         <parent>cm:content</parent>
         <properties>
            <property name="coj:meeting_date">
               <type>d:datetime</type>
               <mandatory>true</mandatory>
            </property>
            <property name="coj:committee">
               <type>d:text</type>
               <constraints>
                  <constraint ref="coj:committeeList" />
               </constraints>
            </property>
            <property name="coj:language">
               <title>langage</title>
               <type>d:text</type>
               <constraints>
                  <constraint ref="coj:languagelist" />
               </constraints>
            </property> 
         </properties>
         <associations>
            <association name="coj:responsible">
            <target>
               <class>cm:person</class>
               <mandatory>false</mandatory>
               <many>false</many>
            </target>
         </association>
           </associations>
      </type>

This is ok, but my problem is to handle the web-client display.
when I have to select the "coj:reponsible", i've got a list of noderef.
As you have probably understood, I want in fact,to display the list of users.

In order to do so, i 've added a converter named "DisplayPathConverter".


<config evaluator="node-type" condition="coj:daily_order">
      <property-sheet>
         <show-property name="coj:meeting_date" />
         <show-property name="coj:committee" />              
         <show-property name="coj:language" />
         <show-association name="coj:responsable"
               converter="org.alfresco.faces.DisplayPathConverter" />
      </property-sheet>
   </config>

NB: coj:daily_order is a subtype of coj:registry_doc.

It seems that it doesn't work at all.
As i'm not sure that the problem is that a converter can be applied to an association, I tried to create my own converter.

In order to make it works, I have to implements the javax.faces.convert.Converter, but where can i declare it ( specific  config xml , or can use a selfmade *-context.xml file) ?
>Ok, i've found faces-config-repo.xml !

Best regards,
JMarc
4 REPLIES 4

gavinc
Champ in-the-making
Champ in-the-making
What version of Alfresco are you using?

This was fixed in the 1.3 Enterprise final release.

jmliege
Champ in-the-making
Champ in-the-making
I'm currently using the community 1.3.0 schema 14.

gavinc
Champ in-the-making
Champ in-the-making
This particular fix is not in the 1.3 community release, only in the enterprise release.

However, I believe the fix may have been merged to SVN now so you may be able to get it from the HEAD branch.

jmliege
Champ in-the-making
Champ in-the-making
Thanks, but as I'm working for one of your partner, i have access to the enterprise version !  😎

I'm currently installing it.

JMarc