Localizing String for drop down search option not working

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2012 07:17 AM
Hi
I have tried doing Document Type, added few properties, able to apply the document type to documents and save the selected document type properties and I am able to search for the selected document type and display the documents in advanced search.
"https://forums.alfresco.com/en/viewtopic.php?f=48&t=44362&p=130386#p130386".
I have uploaded my screen shot of the advanced search option after selecting the document type at
Advice requested
Thanks
Joseph John
I have tried doing Document Type, added few properties, able to apply the document type to documents and save the selected document type properties and I am able to search for the selected document type and display the documents in advanced search.
"https://forums.alfresco.com/en/viewtopic.php?f=48&t=44362&p=130386#p130386".
I have uploaded my screen shot of the advanced search option after selecting the document type at
http://oss101.com/dm/advancedSearch.pngMy issue is that for the drop down option name I am not able to localize strings, I had observed that only for the drop down fields it is not taking value from xxModel.properties
Advice requested
Thanks
Joseph John
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2012 01:38 PM
The ability to localize constraint values is new to version 4 (see JIRA: https://issues.alfresco.com/jira/browse/ALF-9514).
You need to add labels for the constraint values in the model for your property. E.g. like this in bpmModel.properties:
listconstraint.bpm_allowedPriority.1=High
You need to add labels for the constraint values in the model for your property. E.g. like this in bpmModel.properties:
listconstraint.bpm_allowedPriority.1=High

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2012 11:29 PM
Hi Arnold
Thanks for the reply, I am trying to localize the strings as shown in the link http://oss101.com/dm/advancedSearch.png
When I checked bpmModel.xml , I found out that it is for business process model . I got confused over here.
Guidance requested
Thanks
Joseph John
Thanks for the reply, I am trying to localize the strings as shown in the link http://oss101.com/dm/advancedSearch.png
When I checked bpmModel.xml , I found out that it is for business process model . I got confused over here.
Guidance requested
Thanks
Joseph John
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2012 01:30 AM
If you add labels for those values in the message bundle associated to the model that defines your Ig namespace, then it should work, if those list properties get their values from a regular LIST constraint in that model.
If you use some other mechanism to get them, i.e. by calling some custom business logic, then you'll probably need a custom labeling mechanism as well, e.g. one that matches labels based on a naming convention (e.g. Ig_nameofparty.Party_A, etc.).
(Note: You can find info on registering the resource bundle here: http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Registering_a_Model_Resource_Bundle)
If you use some other mechanism to get them, i.e. by calling some custom business logic, then you'll probably need a custom labeling mechanism as well, e.g. one that matches labels based on a naming convention (e.g. Ig_nameofparty.Party_A, etc.).
(Note: You can find info on registering the resource bundle here: http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Registering_a_Model_Resource_Bundle)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2012 02:29 AM
Hi Arnold
I guess I have not explained correctly, my problem is not the value in the drop down, my problem is that the label-id which I have defined in "share-config-custom.xml" and in "myModel.properties" is not getting resolved at the advance search option screen as shown with marked/shaded area in the my http://www.oss101.com/dm/advancedSearch.png
the fields which has to be resolved are "lg:nameofparty, lg
urpose, lg:governinglaw,lg
rgin,lg:category" as shown in the above url
In my "share-config-custom.xml" , I have
Hope I am able to explain it more clearly
Thanks
Joseph John
I guess I have not explained correctly, my problem is not the value in the drop down, my problem is that the label-id which I have defined in "share-config-custom.xml" and in "myModel.properties" is not getting resolved at the advance search option screen as shown with marked/shaded area in the my http://www.oss101.com/dm/advancedSearch.png
the fields which has to be resolved are "lg:nameofparty, lg


In my "share-config-custom.xml" , I have
<field id="lg:nameofparty(ex.custom:prop)" label-id="assoc.lg_nameofparty" ><control template="/org/alfresco/components/form/controls/selectone.ftl" /></field><field id="lg:purpose(ex.custom:prop)" label-id="assoc.lg_purpose" ><control template="/org/alfresco/components/form/controls/selectone.ftl" /></field><field id="lg:governinglaw(ex.custom:prop)" label-id="assoc.lg_governinglaw"><control template="/org/alfresco/components/form/controls/selectone.ftl" /></field><field id="lg:orgin(ex.custom:prop)" label-id="assoc.lg_orgin" ><control template="/org/alfresco/components/form/controls/selectone.ftl" /></field><field id="lg:category(ex.custom:prop)" label-id="assoc.lg_category" ><control template="/org/alfresco/components/form/controls/selectone.ftl" /></field>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
Hope I am able to explain it more clearly
Thanks
Joseph John
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2012 03:19 AM
Ok, sorry, that wasn't clear to me. Looking at the code snippet I think the '(ex.custom
rop)' suffix won't work.. (at least not on the 4.0.b that I am using…don't know about 4.0.d) Should be just id="lg:nameofparty", etc.


Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2012 03:35 AM
Thanks for the mail
If is only ""lg:nameofparty", I wont be able to display the search option in drop down menu.
please check my former post https://forums.alfresco.com/en/viewtopic.php?f=48&t=44362 about the drop down option
Thanks
Joseph John
If is only ""lg:nameofparty", I wont be able to display the search option in drop down menu.
please check my former post https://forums.alfresco.com/en/viewtopic.php?f=48&t=44362 about the drop down option
Thanks
Joseph John
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2012 04:06 AM
Hmm, I don't know this notation of id's and can't find info on it on the wiki. I think mitpatoliya in the other thread might have included it as sample text (i.e. property id = custom
rop = lg:nameofparty).
If you make the id="lg:nameofparty" then the label-id should work. You can localize the list values in the message bundle, but you can also specify value/label pairs in the form definition on the selectone form control, by setting the 'options' controlparameter. See: http://wiki.alfresco.com/wiki/Forms#selectone.ftl.
In the model you can specify the default value for the list property as well.

If you make the id="lg:nameofparty" then the label-id should work. You can localize the list values in the message bundle, but you can also specify value/label pairs in the form definition on the selectone form control, by setting the 'options' controlparameter. See: http://wiki.alfresco.com/wiki/Forms#selectone.ftl.
In the model you can specify the default value for the list property as well.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 04:52 PM
Just my two cents, may not apply here. Generally speaking, depending on situation, option values inside the dropdown list
<control .. selectone.ftl" />‍
may be fetched from a resource bundle in a different context to its field label <field .. label-id= ..>‍
. Eg. the select option values could come from a resource bundle in Alfresco's Spring context if EnumParameterConstraint is used while the actual label could come from a resource bundle sitting in Share's Spring context.
