- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2013 01:42 AM
When using share forms for displaying node properties, localized constraint values are automatically translated by the forms engine.
We are outputting node properties outside of the forms engine in Share and we need to do the same there.
Does anyone know how to do the same in a share/repo webscript?
Just outputing the node property value will just give the value defined in the constarint, not the translated value.
Thanks!
Marcus
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 05:26 AM
Now I get it. According to Data dictionary guide right inscription is:
listconstraint.iww_reviewOutcomeOptions.Approve=Approve
listconstraint.iww_reviewOutcomeOptions.Reject=Reject
listconstraint.iww_reviewOutcomeOptions.Delegate=Delegate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2013 06:29 AM
you need to construct the message key for list constraint and obtain the translated value via the MessageService / msg root-scoped object (e.g. in FreeMarker template). The message key follows the pattern "listconstraint.<constraintName>.<value>"
Regards
Axel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 11:15 AM
Hi Axel.
What message key do you write about.
I have model defined in repo:
<type name="iww:reviewTask">
<parent>bpm:activitiOutcomeTask</parent>
<properties>
<property name="iww:reviewOutcome">
<type>d:text</type>
<mandatory>false</mandatory>
<default>Delegate</default>
<index enabled="true"/>
<constraints>
<constraint name="iww:reviewOutcomeOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value>Approve</value>
<value>Reject</value>
<value>Delegate</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
What I have to put into messages/property file?
iww_workflowModel.constraint.iww_reviewOutcomeOptions.value=Approve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 11:20 AM
In your case you would have properties like:
iww_workflowModel.constraint.iww_reviewOutcomeOptions.Approve=Translated value of Approve
iww_workflowModel.constraint.iww_reviewOutcomeOptions.Reject=Translated value of Reject
iww_workflowModel.constraint.iww_reviewOutcomeOptions.Delegate=Translated value of Delegate
I would always recommend to create a new question instead of responding to a 4-year old thread.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2017 09:17 AM
Thank you but it is not working for me.
Here is bootstrap-context:
<bean id="acProcess-repo-amp.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/content-model.xml</value>
<value>alfresco/module/${project.artifactId}/model/workflow-model.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/module/${project.artifactId}/messages/content-model</value>
<value>alfresco/module/${project.artifactId}/messages/workflow-model</value>
</list>
</property>
</bean>
labels from content-model work.
Alfresco documentation doesn't know constraint in properties pattern....
The naming convention patter for these resource properties are as follows:
{content model namespace}_{content model local name}.[type|aspect|property|association|child-association].{content model namespace}_{local name}.[title|description]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2017 01:41 PM
Even though the information is not in the documentation, it for sure works.
It would be nice if you send them a feedback on the topic, mentioning the documentation lacks that information.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 05:26 AM
Now I get it. According to Data dictionary guide right inscription is:
listconstraint.iww_reviewOutcomeOptions.Approve=Approve
listconstraint.iww_reviewOutcomeOptions.Reject=Reject
listconstraint.iww_reviewOutcomeOptions.Delegate=Delegate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2013 08:19 AM
Basically we are fetching all node properties on the repo side and consume them in the share web script. The server side script is generic, so it will just output all properties. The share webscript will format data and output it on a page.
One solution would be to duplicate the message bundle on the repo side and make it available in share as well, but I don't like duplicating stuff. I was more hoping for a service in share which will have access to all data model related translations, do you know of any?
Thanks,
Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2013 08:36 AM
I don't know of any service in Share that has access to ALL the data model translations. The FormUIGet has access to list of value constraints and their translations through the FormService. Other than that, I think you need to ship your own…
Regards
Axel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2013 12:50 PM
