cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying custom metadata in Alfresco

horia
Champ in-the-making
Champ in-the-making
Hi,

Using the help provided by the people on this forum, I was able to add custom aspects to documents in order to set custom properties.
The next step for me would be to have a local instance of Alfresco displaying the custom properties and having them editable so that users can change their values via the web pages.

There's a good link on wiki.alfresco <a>http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata</a> that describes just that and I followed the instructions, but it's not working for me.

In short, I added a custom aspect called my:customAspect like this:

AlfrescoDocument alfDoc = … // get existing document
alfDoc.addAspect("P:my:customAspect");

// set additional properties
Map<String, Object> propertiesEnum = new HashMap<String, Object>();
properties.put("my:score", 152);

alfDoc.updateProperties(updateProperties);


The properties were correctly added and I can see their values either programatically or by using Apache Chemistry Workbench desktop client.


In order to have the additional properties visible in Alfresco Web client, I updated the web-client-config-custom.xml file by setting:

  <config evaluator="aspect-name" condition="my:customAspect">
      <property-sheet>
         <show-property name="my:score"/>
      </property-sheet>
   </config>


Unfortunately, I can't see this property listed in the Alfresco web (including the /share one) for the documents on whom I added the custom aspect.

Maybe I'm missing something, maybe there are some other xml files that should be updated.

Any help appreciated.

Thanks
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
The web-client-config-custom.xml file is for the old /alfresco web client, not for /share. Take a look at <a href="http://ecmarchitect.com/archives/2012/01/09/1509">this tutorial</a> to learn how to configure both /alfresco and /share to show custom metadata. It also includes some CMIS examples you might find helpful.

Jeff

horia
Champ in-the-making
Champ in-the-making
That tutorial is indeed what I was looking for, thanks