AnsweredAssumed Answered

[Solved] AMP with ResourceBundle example?

Question asked by lyamamot on Nov 5, 2008
Latest reply on Nov 5, 2008 by lyamamot
I've been trying to build an AMP module for Alfresco Labs 3b that includes a resource bundle for my model properties that show up in the web client, but it just doesn't seem to work. Does anybody have an example of an AMP where this works? Here are the relevant bits of code:

config/alfresco/module/com_Xxx/module-context.xml:

<bean id="my_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
    <property name="models">
        <list><value>alfresco/module/com_Xxx/models/myModel.xml</value></list>
    </property>
    <property name="labels">
        <list><value>alfresco.module.com_Xxx.models.myModel</value></list>
    </property>   
</bean>

My model file (myModel.xml) is in config/alresco/module/com_Xxx/models, as is my resource bundle, myModel.properties. I have a web-client-config-custom.xml with entries similar to:

<alfresco-config>
    <!– Add type properties to the property sheet. –>
    <config evaluator="node-type" condition="xx:myType">
        <property-sheet>
            <show-property name="xx:myProp" display-label-id="xx_myType.property.xx_myProp.propName" />
        </property-sheet>
    </config>
</alfresco-config>

The properties show up when I view the details of a particular piece of content, but my custom keys are all like $$xx_myType.property.xx_myProp.propName$$ and I see errors in the Tomcat log about failing to find the I18N message string key.

Outcomes