How do I change the display name for an aspect?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2012 01:47 PM
This is my aspect:
In Alfresco Share then name is "aspect.ac_androidContentProps". How do I change that to something that is friendly?
<?xml version="1.0" encoding="utf-8"?><model name="ac:androidContent" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>Android Content Model</description> <author>Cynergy</author> <version>1.0</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <namespaces> <namespace uri="http://www.cynergy.com/androidContent/content/1.0" prefix="ac"/> </namespaces> <constraints> <constraint name="ac:NotificationSummary_Length" type="LENGTH"> <parameter name="minLength"> <value>1</value> </parameter> <parameter name="maxLength"> <value>50</value> </parameter> </constraint> <constraint name="ac:Priority_Options" type="LIST"> <parameter name="allowedValues"> <list> <value>High</value> <value>Medium</value> <value>Low</value> </list> </parameter> </constraint> </constraints> <aspects> <aspect name="ac:androidContentProps"> <title>Android Content</title> <properties> <property name="ac:propNotify"> <title>Notify</title> <type>d:boolean</type> </property> <property name="ac:propNotificationSummary"> <title>Notification Summary</title> <type>d:text</type> <constraints> <constraint ref="ac:NotificationSummary_Length" /> </constraints> </property> <property name="ac:propArchiveDate"> <title>Archive Date</title> <type>d:datetime</type> </property> <property name="ac:propPublishDate"> <title>Publish Date</title> <type>d:datetime</type> </property> <property name="ac:propPriority"> <title>Priority</title> <type>d:text</type> <multiple>false</multiple> <constraints> <constraint ref="ac:Priority_Options" /> </constraints> </property> </properties> </aspect> </aspects></model>
In Alfresco Share then name is "aspect.ac_androidContentProps". How do I change that to something that is friendly?
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2012 05:18 PM
Hello,
you need to provide a message bundle (*.properties with human readable labels) to Share. Will Abson describes this (among other things) in his Guide to add custom aspects to Share.
Regards
Axel
you need to provide a message bundle (*.properties with human readable labels) to Share. Will Abson describes this (among other things) in his Guide to add custom aspects to Share.
Regards
Axel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2012 04:08 PM
That didn't work for me.
acandroidContent.properties
myexample-model-context.xml
acandroidContent.properties
ac_androidContent.aspect.ac_androidContentProps=Android Contentaspect.ac_androidContentProps=Android Content
myexample-model-context.xml
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><beans> <bean id="example.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/extension/myModel.xml</value> <value>alfresco/extension/acandroidContent.xml</value> </list> </property> <property name="labels"> <list> <value>alfresco/extension/mymodel</value> <value>alfresco/extension/acandroidContent</value> </list> </property> </bean></beans>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2012 04:37 PM
P.S. I see that my friendly name for the aspect is showing up when I create a new folder rule. It is when I am directly applying the aspect to an item that it uses the ugly name.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2012 06:38 AM
have you registered your property file.
I think in your context file you need to have entry for that as well.
I think in your context file you need to have entry for that as well.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2012 06:57 AM
Your configuration only applies to labels on the Repository tier - you need to provide custom aspect label properties in Share as well.
Taken from the link to Will Absons post I provided earlier:
1) Define an additional message bundle (in Share Tomcat /shared/classes/alfresco/web-extension/custom-slingshot-application-context.xml)
2) Create a XY.properties file in your Share Tomcat (assuming you follow best practice of separating Share and Repository) /shared/classes/alfresco/messages folder that contains your aspect label
Regards
Axel
Taken from the link to Will Absons post I provided earlier:
1) Define an additional message bundle (in Share Tomcat /shared/classes/alfresco/web-extension/custom-slingshot-application-context.xml)
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><beans> <!– Add XY messages –> <bean id="webscripts.xy.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent"> <property name="resourceBundles"> <list> <value>alfresco.messages.XY</value> </list> </property> </bean></beans>
2) Create a XY.properties file in your Share Tomcat (assuming you follow best practice of separating Share and Repository) /shared/classes/alfresco/messages folder that contains your aspect label
aspect.kb_referencable=Knowledge Base Referencable
Regards
Axel
