cancel
Showing results for 
Search instead for 
Did you mean: 

Webclient.properties in custom AMP

ukdavo
Champ in-the-making
Champ in-the-making
Hi folks

I've packaged up a custom content model definition in an AMP file. Included in the AMP is a web-client-config.xml that makes the custom types and aspects available in the Explorer UI. This all works fine except for the fact that the labels for the custom properties are not correctly rendered. I get the following error in the logfile:


WARN  [web.app.ResourceBundleWrapper] [http-8080-1] Failed to find I18N message key: my_documentType for locale: en_US

I added a resource bundle webclient.properties to the AMP file at various locations:

/config/extension/webclient.properties
/config/alfresco/module/${moduleId}/webclient.properties
/config/alfresco/module/${moduleId}/model/webclient.properties
/config/alfresco/module/${moduleId}/ui/webclient.properties              (this is where I have my web-client-config.xml)

..but no joy - same error. I then copied the resource bundle to $TOMCAT/shared/classes/alfresco/extension/webclient.properties. This works but the problem is that it's not included in the AMP. Is there anyway that I can include the webclient.properties in the AMP?

Cheers

Mark

PS
I tried this with Alfresco Community 4.0d (32-bit Win).
2 REPLIES 2

billerby
Champ on-the-rise
Champ on-the-rise
Hi,

Declare a bean in your spring-context file. ie:


<!–Register resource bundle  –>
   <bean id="myamp.bootstrapMyAmpBundlesBean"
      class="org.alfresco.web.app.ResourceBundleBootstrap">
      <property name="resourceBundles">
         <list>
            <value>alfresco.module.myamp.messages.webclient</value>
         </list>
      </property>
   </bean>

Then place it in /config/messages in your amp.

/Erik

ukdavo
Champ in-the-making
Champ in-the-making
Thanks for that Erik - works like a champ.