AMP for Web Client Links in Associations

cancel
Showing results for 
Search instead for 
Did you mean: 

AMP for Web Client Links in Associations

resplin
Intermediate
0 0 972

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Forge Projects


Introduction


This page describes an Alfresco Module Package that extends the Alfresco Web Client to show links for associations. Thus, if you visit the 'Details of' page of a node and this node has association properties, the target nodes are rendered as clickable links; clicking on one will bring you to the 'Details of' page of the target node.

As of version 0.9.2, the module also has an option to add a button 'Create' next to the 'Search' button in the 'Modify Content Properties' dialog of a node. The user can then enter a text (into the search field) and click 'Create', the result of which is a new target node of the association created and associated to the current node.

This AMP was not developed by Alfresco engineers but contributed by community members; it is therefore neither official nor does it come with any kind of guarantee. You are free to use it, however, for whatever you want. If the features provided by this AMP get incorporated into Alfresco, this module will become obsolete.

Current version: 0.9.3
Requirements: Alfresco 2.1 r1207 (this is not Alfresco Community Release 2.1)

Download link: Alfresco Forge

Note: The AMP might work on Alfresco Community 2.1 but I have not tested it.


Installation


The AMP is installed like any other Alfresco Module Package. Download it from Alfresco Forge. After installing, start the server and take a look at the server log (in case of Tomcat this is catalina.out) to verify that the module was indeed loaded; you should see something like this:

13:04:35,260 User:System INFO  [repo.module.ModuleServiceImpl] Starting module 'org.alfrsco.module.WebClientAssocLinksSupport' version 0.9.3.

Configuration


How to enable links in associations


To show links to the association targets of a node, edit your faces-config-custom.xml to something like:

<faces-config>

<managed-bean>
  <managed-bean-name>ChildAssociationWithLinksGenerator</managed-bean-name>
  <managed-bean-class>org.alfresco.module.WebClientAssocLinksSupport.ui.ChildAssociationWithLinksGenerator</managed-bean-class>
  <managed-bean-scope>request</managed-bean-scope>
  <managed-property>
   <property-name>dontShowWholeDisplayPath</property-name>
   <value>false</value>
  </managed-property>
  <managed-property>
   <property-name>showCreateButton</property-name>
   <value>false</value>
  </managed-property>
</managed-bean>

</faces-config>

This makes ChildAssociationWithLinksGenerator a customized generator which you can use, as above, in your Web Client configuration file. For instance:

<show-property name='kc:description' component-generator='ChildAssociationWithLinksGenerator'/>

How to show the Create button


In order to show the 'Create' button mentioned in the introduction, set the value of the managed property showCreateButton in your file faces-config-custom.xml to true. By changing the managed property dontShowWholeDisplayPath you can also hide the full display path so that only the name of the targets are shown.


Known issues


  • On the 'Modify Content Properties' page, the association targets are not yet shown with clickable links.
  • Major issue: If you use the 'Create' button feature of this AMP, notice that once the 'Create' button is clicked, the target node will be created immediately. So even if the user clicks the 'Cancel' button, the new target node will remain to exist.

Contact


For further information on this AMP, refer to the Alfresco Forge set (see download link above).