Using SDK 3.0.1 (jar build default configuration), AIO, ACS 5.2.N, the resulting repo jar (contains custom model) and share jar (contains the share form labels for custom model) are deployed in the respective wars (alfresco,share).
Post model deployment, using the <web-extension> (tomcat/shared/classes/alfresco/web-extension) location to override the messages for the custom model does not work. The message labels from within the share jar are not overridden by the labels in the web-extensions external path.
- create SDK3 AIO project, configuration with Enterprise (5.2.N)
- build project
note: this contains a sample custom (Acme) model with the messages for both repo/share and share-config-context.xml for share forms
- deploy the repo and share jar's generated in the project target to a normal installed ACS 5.2.N instance in the WEB-INF/lib directory for each respective war
see example attached jars: contentmodel-platform-jar-1.0-SNAPSHOT.jar and contentmodel-share-jar-1.0-SNAPSHOT.jar.withMessages
- startup the application server
- log in to Share UI
- create/upload a document, go to document details page
- us action menu and change document type to 'Acme Document'
- scroll down to properties panel in right section of document details page, note the labels used for the custom model properties
- shut down application server
- copy messages directory to tomcat/shared/classes/alfresco/web-extension/messages, and modify the properties file labels for the custom model to something different
See attached zip: messages.zip
- modify the tomcat/shared/classes/alfresco/web-extension/custom-slingshot-application-context.xml and add bean to load the messages resource override
- start application server, log in to share, navigate to same document's detail page
- review the custom model properties labels
- shut down application server
- remove the bean loading the custom model messages in the share maven jar project
- rebuild, swap out the share jar in the share.war/WEB-INF/lib
see attached jar: contentmodel-share-jar-1.0-SNAPSHOT.jar
- start application server up
- log in to share, navigate to the document details page
- scroll to the custom model properties and note the labels rendered
- using the <web-extension> external path DOES overrides Share UI custom model labels deployed via jar/amp to share
- using the <web-extension> external path DOES NOT override Share UI custom model labels deployed via jar/amp to share
To be able to set the messages using the <web-extension> external path, you disable(remove or comment out) the resource context bean loading the custom model messages properties from the SDK3 share jar (basically removing it completely from jar).
- default common and slingshot message labels successfully override, though they are located and deployed different path in share war
old AMP deployment for models would of been ex.
- amp configuration setting in SDK3, makes no difference as the content it still packaged into a jar within the amp lib directory
ex. share.amp/lib/<custom share>.jar