Display Custom Property from Object Finder Component
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2013 06:03 PM
Dear Alfresco Community,
I´m trying to use the Alfresco Object Finder Component for providing selectable capabilities in a custom property who must contain a NodeRef value. The idea is very similar to the category.ftl control but referencing a custom NodeType. That works fine!. But when the Object Finder displays the node, i always got the UUID property.
My instantiation of the Object Finder is something like this:
I have been tracing the Repository Web Script responsable for providing the datas to the Object Finder and I found the following issue in the pickerresults.lib.ftl:
As you'll can see, those are the only properties available for the Object Finder Component in the data Web Scripts.
So… How can I display a custom property in the Object Finder ?
There is a way?
Or I need to use always the cm:name property ?
Thanks!!
I´m trying to use the Alfresco Object Finder Component for providing selectable capabilities in a custom property who must contain a NodeRef value. The idea is very similar to the category.ftl control but referencing a custom NodeType. That works fine!. But when the Object Finder displays the node, i always got the UUID property.
My instantiation of the Object Finder is something like this:
<@renderPickerJS field "picker" /> picker.setOptions( { itemType: "tdl:tagContainer", multipleSelectMode: ${(field.control.params.multipleSelectMode!true)?string}, parentNodeRef: "workspace://SpacesStore/be767794-5055-493b-866b-04cb23440c1f", field: "tdl:spanishTagValue", maintainAddedRemovedItems: false, params: "${field.control.params.params!""}", createNewItemUri: "${field.control.params.createNewItemUri!}", createNewItemIcon: "${field.control.params.createNewItemIcon!}" });
I have been tracing the Repository Web Script responsable for providing the datas to the Object Finder and I found the following issue in the pickerresults.lib.ftl:
…"items": [ <#list results as row> { "type": "${row.item.typeShort}", "isContainer": ${row.item.isContainer?string}, "name": "${row.item.properties.name!""}", "title": "${row.item.properties.title!""}", "description": "${row.item.properties.description!""}", <#if row.item.properties.modified??>"modified": "${xmldate(row.item.properties.modified)}",</#if> <#if row.item.properties.modifier??>"modifier": "${row.item.properties.modifier}",</#if> <#if row.item.siteShortName??>"site": "${row.item.siteShortName}",</#if> "displayPath": "${row.item.displayPath!""}", "nodeRef": "${row.item.nodeRef}"<#if row.selectable?exists>, "selectable" : ${row.selectable?string}</#if> }<#if row_has_next>,</#if> </#list> ]…
As you'll can see, those are the only properties available for the Object Finder Component in the data Web Scripts.
So… How can I display a custom property in the Object Finder ?
There is a way?
Or I need to use always the cm:name property ?
Thanks!!
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2013 02:37 AM
you can try this in pickerresults.lib.ftl
<#if row.item.properties.[custom
ropertyname]??>"myproperty": "${row.item.properties.[custom
ropertyname]}",</#if>
here "custom
ropertyname" is your custom property
<#if row.item.properties.[custom


here "custom

