cancel
Showing results for 
Search instead for 
Did you mean: 

Action Label not showing

mangar
Star Contributor
Star Contributor
I have this custom action defined like this:


     <action id="com.sammy.doclib.action.writeToLog"
              icon="log_write"
              type="javascript"
              label="actions.sammy.writeToLog">
         <param name="function">onActionWriteToLog</param>
         <param name="successMessage">message.writeToLog.success</param>
         <param name="failureMessage">message.WriteToLog.failure</param>
         <evaluator negate="true">com.sammy.share.action.evaluator.LogWriteEvaluator</evaluator>
      </action>

It shows up just fine. icon and everything,  however the label is not showing.  I have a custom.properties file in /share/WEB-INF/classes/alfresco/messages

with this line:
actions.sammy.writeToLog=Write to log

but what is showing is: actions.sammy.writeToLog right next to the icon.

Why is it not picking this up?  is my properties file in the wrong place?
2 REPLIES 2

jbrucher
Champ in-the-making
Champ in-the-making
Hi mangar,

do you have defined your custom.properties inside the custom-slingshot-application-context.xml?
This file is placed in either:
shared/classes/alfresco/web-extension
or
share/WEB-INF/classes/alfresco/web-extension

with the following entry:

<bean id="<Your ID>" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.messages.custom</value>
         </list>
      </property>
</bean>

In my experience it's important that for share the messages bundles are defined in that way! Define the message bundles only inside alfresco/WEB-INF/… only works for the Alfresco-Explorer not for Share…

mangar
Star Contributor
Star Contributor
A point to you sir!

That did it.  And to be clear for anyone else reading this:

the  <value>alfresco.messages.custom</value>  means that you have a custom.properties file in /WEB-INF/classes/alfresco/messages

Just like a regular resource bundle in Java.