How to add a display values for my constraint's allowedValues?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2015 09:03 AM
Desperately trying to figure out how to add localization for constraints of type LIST with allowed values. I researched and found this ticket: https://issues.alfresco.com/jira/browse/MNT-5383 marked closed, but I can't find a definitive word on the syntax.
I'm trying:
<constraint name="aaa:subsystemValues" type="LIST">
<parameter name="allowedValues">
<list>
<value>Value_A</value>
<value>Value_B</value>
</list>
</parameter>
</constraint>
Referenced in:
<property name="aaa:subsystem">
<title>Subsystem</title>
<type>d:text</type>
<constraints>
<constraint ref="aaa:subsystemValues" />
</constraints>
</property>
I've tried many deviations, but NONE of them work!
listconstraint.aaa_subsystemValues.Value_A=DLD1
listconstraint.subsystemValues.Value_A=DLD2
aaa_subsystemValues.Value_A=DLD3
prop.aaa_subsystemValues.Value_A=DLD4
Checking the source code I see a getDisplayLabel and the comments say:
* A key is constructed as follows:
* <pre>
* "listconstraint." + constraintName + "." + constraintAllowableValue.
* e.g. listconstraint.test_listConstraintOne.VALUE_ONE.
I'm trying:
<constraint name="aaa:subsystemValues" type="LIST">
<parameter name="allowedValues">
<list>
<value>Value_A</value>
<value>Value_B</value>
</list>
</parameter>
</constraint>
Referenced in:
<property name="aaa:subsystem">
<title>Subsystem</title>
<type>d:text</type>
<constraints>
<constraint ref="aaa:subsystemValues" />
</constraints>
</property>
I've tried many deviations, but NONE of them work!
listconstraint.aaa_subsystemValues.Value_A=DLD1
listconstraint.subsystemValues.Value_A=DLD2
aaa_subsystemValues.Value_A=DLD3
prop.aaa_subsystemValues.Value_A=DLD4
Checking the source code I see a getDisplayLabel and the comments say:
* A key is constructed as follows:
* <pre>
* "listconstraint." + constraintName + "." + constraintAllowableValue.
* e.g. listconstraint.test_listConstraintOne.VALUE_ONE.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2015 04:33 PM
SO…it seems that you can't localize the values in the share properties file, but I had to add a properties file into the REPO section of my amp. I added it my amp's service-context.xml file AND (the most annoying part) you don't refer to it as .properties, but you just give the basename (different from the "models" property where you DO give the extension).
So below the code where I specify my model file I added:
<property name="labels">
<list>
<value>alfresco/module/${project.artifactId}/messages/myModel</value>
</list>
</property>
So below the code where I specify my model file I added:
<property name="labels">
<list>
<value>alfresco/module/${project.artifactId}/messages/myModel</value>
</list>
</property>
