08-20-2014 09:22 PM
I'm just getting started with Nuxeo development and am looking now at working with Extension Points [Nuxeo 5.9.5 with Studio].
The blog posting here seemed like a good place to start. I decided to do a similar exercise where the goal is to change the label on the Workspace/Manage tab for 'Local configuration'. Change it to 'New Local Configuration'.
I located the Local Configuration tab (TAB_LOCAL_CONFIGURATION
) here. It comes from the nuxeo-platform-webapp-core-5.6.jar file.
When I look in that jar file, I see in the Manifest.Mf the following:
Bundle-SymbolicName: org.nuxeo.ecm.webapp.core
Based on that, I created the following XML Extension in Studio:
<component name="org.nuxeo.sample.action.contrib.config.override">
<require>org.nuxeo.ecm.webapp.core</require>
<extension point="actions" target="org.nuxeo.ecm.platform.actions.ActionService">
<documentation>
Override the TAB_LOCAL_CONFIGURATION action to change its label.
</documentation>
<action id="TAB_LOCAL_CONFIGURATION" label="new.tab.local.configuration" />
</extension>
</component>
Here I defined a new label called new.tab.local.configuration
I wasn't sure where to put this new string. I tried a few things, but the most reasonable seemed to reference it from Studio as a Resource.
So, I created a new file called override.properties containing the following one line:
new.tab.local.configuration=New Local Configuration
And then uploaded that file as an I18 resource:
But after doing an Update and even then restarting the server manually, I don't see that the string has changed.
On the server, I see that the custom jar file has been updated to include the new properties file in the directory data\i18n and I also see the file in the jar file called extensions.xml has the XML Extension that I configured within Studio.
Is there something else that I need to do, or something that I've done wrong?
08-21-2014 11:33 AM
Also note that you must not do a <require>
of a bundle's name, but of a Nuxeo component name (the one at the top of the XML file). As mentioned in the Explorer page you linked for the platform actions, in this case it's org.nuxeo.ecm.platform.actions
.
The blog article you mention is talking about a <require>
in the context of a deployment-fragment.xml
, which is a different thing as it controls the order of execution of whole bundles' deployment fragments. This has nothing to do with the order in which components are deployed.
08-21-2014 07:07 AM
Hi,
When you want to change a label on your application, you have to upload a .properties file as you did but make sure to name it "messages_[COUNTRY].properties". The file name will not be recognized if it is not properly formatted. You will find the related documentation here: http://doc.nuxeo.com/x/jAM7.
Also, on your XML Extension point I noticed that you put a
Manon
08-21-2014 11:33 AM
Also note that you must not do a <require>
of a bundle's name, but of a Nuxeo component name (the one at the top of the XML file). As mentioned in the Explorer page you linked for the platform actions, in this case it's org.nuxeo.ecm.platform.actions
.
The blog article you mention is talking about a <require>
in the context of a deployment-fragment.xml
, which is a different thing as it controls the order of execution of whole bundles' deployment fragments. This has nothing to do with the order in which components are deployed.
08-21-2014 01:18 PM
Thanks Florent and Manon. After changing the <require>
, it then identifies the tab that I want to override.
But the instructions in the blog article say the following:
I must be misunderstanding this -- it seems not to be correct, or is this explanation referring to a configuration made without Studio? I was using the Bundle-SymbolicName from the jar file.
I've changed the XML Extension now look like this:
And within Nuxeo DM, I now see a change to the tab, but it isn't picking up the custom string:
Based on Manon's suggestion, I then renamed my properties file to be "messages_en_US.properties
". That seems to have fixed it. Yay! It appears that I must name my strings file "messages*.properties
". I had thought that it would pick up any properties file.
08-22-2014 02:54 PM
Please don't add as answers things that are not answers, this is not a forum. You should update your existing question or add a comment.
08-22-2014 02:57 PM
I updated my answer with respect to the <require>
part. Also note that the order of deployment of messages properties files is controlled by the bundle fragment, not a single extension component inside a bundle.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.