cancel
Showing results for 
Search instead for 
Did you mean: 

show links to the association targets of a node

esource
Champ on-the-rise
Champ on-the-rise
I wanted to show links to the targets of a node.  I found the following page that was very interesting:

http://wiki.alfresco.com/wiki/AMP_for_Web_Client_Links_in_Associations

So, I installed the AMP, and edited faces-config-custom.xml.

I wanted to display links for the associations in an aspect, so I altered the settings in web-client-config-custom.xml  

<config evaluator="aspect-name" condition="some:moreDocs">
     <property-sheet>
         <show-association name="some:asscDocs" component-generator="ChildAssociationWithLinksGenerator"/>
     </property-sheet>
   </config>

but I get the following error:

javax.faces.FacesException: java.lang.ClassCastException: org.alfresco.module.WebClientAssocLinksSupport.ui.UIChildAssociationWithLinksEditor cannot be cast to org.alfresco.web.ui.repo.component.property.UIAssociationEditor
caused by:
org.apache.jasper.JasperException: java.lang.ClassCastException: org.alfresco.module.WebClientAssocLinksSupport.ui.UIChildAssociationWithLinksEditor cannot be cast to org.alfresco.web.ui.repo.component.property.UIAssociationEditor
caused by:
java.lang.ClassCastException: org.alfresco.module.WebClientAssocLinksSupport.ui.UIChildAssociationWithLinksEditor cannot be cast to org.alfresco.web.ui.repo.component.property.UIAssociationEditor

would anyone know why the error occurs and how to properly use Web_Client_Links_in_Associations?
2 REPLIES 2

esource
Champ on-the-rise
Champ on-the-rise
I think I have posted this in the wrong section.  It should go in the development forums.

skywolf
Champ in-the-making
Champ in-the-making
Hi ,

Maybe it's a litle to late but I had the same issue.
I had to change the association declaration in my model like this:


<associations>
     <child-association name="some:asscDocs">
     …..
    </child-association>
</associations>

And in web-client-config-custom.xml I also changed


<property-sheet>
     <show-child-association name="some:asscDocs" component-generator="ChildAssociationWithLinksGenerator"/>
</property-sheet>

It works almost nice. Just a NullPointer sometimes but linking is ok …