cancel
Showing results for 
Search instead for 
Did you mean: 

Message bundles loaded from repository

kamielvdz
Champ in-the-making
Champ in-the-making
Is it possible to load message bundles dropped in /Data Dictionary/Messages into Share just like in Explorer? E.g. by using the ResourceBundleBootstrapComponent?

<bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>webscripts.messages.webscripts</value>
            <value>alfresco.messages.common</value>
            <value>alfresco.messages.slingshot</value>
         </list>
      </property>
   </bean>

I need a common message bundle for Share and the repository to avoid redundancy. Maybe there is another way to achieve this, but I do not want to load from the shared classes folder as Share and the repository will be hosted on separate locations.

Any pointers are appreciated.
1 REPLY 1

erikwinlof
Confirmed Champ
Confirmed Champ
No not really since the ResourceBundleBootstrapComponent only accept property files, or as in the java api described as "baseNames" (the base name of the resource bundle, a fully qualified class name).

Are you are this is something you want? You might accidentally add a new property that makes sense in the repo but may that overrides a msg key that is used in Share?

If you are sure you want to do this I suggest making it a packaging exercise that copies the .properties files both to your repository AND Share distributions.

To make your file get picked up in Share simply add your custom .properties files to the list of resource bundles in alfresco/web-extension/acme-slingshot-context.xml:

   <bean id="acme.custom.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>acme.messages.common</value>
         </list>
      </property>
   </bean>