Customize datalist's element name
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2013 11:33 AM
Hi all,
i have created a custom datalist. The datalist's Elements is associated to a custom type: CustomType. When i navigate to select the datalist's element to bind to CustomType, in my datalist there is a list of nodeId (i suppose) of the datalist's elements.
[img]http://s7.postimage.org/k57yaothz/Cattura.jpg[/img]
The Question for you is:
can i customize that id with some prior choosen property?
Regards all,
Bye
i have created a custom datalist. The datalist's Elements is associated to a custom type: CustomType. When i navigate to select the datalist's element to bind to CustomType, in my datalist there is a list of nodeId (i suppose) of the datalist's elements.
[img]http://s7.postimage.org/k57yaothz/Cattura.jpg[/img]
The Question for you is:
can i customize that id with some prior choosen property?
Regards all,
Bye
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2014 03:06 AM
Hi,
In datalist element, at the time of creation we not provide name, so alresco generates random name for it. That looks like nodeid, but that is not a node-id, if you want to change it, either show the name field in creation form or apply a rule to set some property of your datalist item as name, so you can the datalist item with some name rather than random id in selection picker.
In datalist element, at the time of creation we not provide name, so alresco generates random name for it. That looks like nodeid, but that is not a node-id, if you want to change it, either show the name field in creation form or apply a rule to set some property of your datalist item as name, so you can the datalist item with some name rather than random id in selection picker.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2014 10:44 AM
I had similar issue and just exposed the name property via share-custom-config:
<config evaluator="node-type" condition="dl:dataList">
<forms>
<form>
<field-visibility>
<show id="cm:name" force="true" />
</field-visibility>
<appearance>
<field id="cm:name" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
…
<config evaluator="node-type" condition="dl:dataList">
<forms>
<form>
<field-visibility>
<show id="cm:name" force="true" />
</field-visibility>
<appearance>
<field id="cm:name" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
…
