05-11-2020 01:49 AM
Hi Team,
I want one column of datalist (sr.no) in ascending order by default.
I have added below code in share-config-custom.xml for sorting,but that didn't helped.
<config evaluator="string-compare" condition="DocumentLibrary" replace="true"> <sorting> <sort label="Employee ID" isSortable="true">emp:empId|true</sort> </sorting> </config>
I have made datalist model like below
<type name="emp:employeeDetails"> <title>Employee Details</title> <parent>dl:dataListItem</parent> <properties> <property name="emp:empId"> <title>Employee ID</title> <type>d:int</type> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>false</tokenised> <facetable>true</facetable> </index> </property> <property name="emp:firstName"> <title>First Name</title> <type>d:text</type> </property> </properties> </type>
Is there any other configuration required or am i missing something?
Thanks,
Hardik
05-22-2020 07:48 AM
Anyone has faced simiilar issue? Still, i am looking for help/solution/approach.
05-23-2020 09:56 AM
Hi,
can you please share screen shots from share and the whole share-config-custom.xml file.
This configuration works for me:
<!-- Document Library config section --> <config evaluator="string-compare" condition="DocumentLibrary" replace="true"> <sorting> <sort label='Naziv'>ecm:naziv</sort> </sorting> <tree> <!-- Whether the folder Tree component should enumerate child folders or not. This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures. --> <evaluate-child-folders>false</evaluate-child-folders> <!-- Optionally limit the number of folders shown in treeview throughout Share. --> <maximum-folder-count>1000</maximum-folder-count> <!-- Default timeout in milliseconds for folder Tree component to recieve response from Repository --> <timeout>7000</timeout> </tree> <!-- Used by "Manage Rules" -> "Add aspect" action. If an aspect has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the aspect to be visible when creating rules: custom_customModel.aspect.custom_myaspect.title=My Aspect Used by the "Manage Aspects" action. For the aspect to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension: aspect.custom_myaspect=My Aspect --> <aspects> <!-- Aspects that a user can see --> <visible> <aspect name="cm:generalclassifiable" /> <aspect name="cm:complianceable" /> <aspect name="cm:dublincore" /> <aspect name="cm:effectivity" /> <aspect name="cm:summarizable" /> <aspect name="cm:versionable" /> <aspect name="cm:templatable" /> <aspect name="cm:emailed" /> <aspect name="emailserver:aliasable" /> <aspect name="cm:taggable" /> <aspect name="app:inlineeditable" /> <aspect name="cm:geographic" /> <aspect name="exif:exif" /> <aspect name="audio:audio" /> <aspect name="cm:indexControl" /> <aspect name="dp:restrictable" /> <aspect name="smf:customConfigSmartFolder" /> <aspect name="smf:systemConfigSmartFolder" /> </visible> <!-- Aspects that a user can add. Same as "visible" if left empty --> <addable> </addable> <!-- Aspects that a user can remove. Same as "visible" if left empty --> <removeable> </removeable> </aspects> <!-- Used by "Manage Rules" -> "Specialise type" action. If a type has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the type to be visible when creating rules: custom_customModel.type.custom_mytype.title=My SubType Used by the "Change Type" action. For the type to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension: type.custom_mytype=My SubType Define valid subtypes using the following example: <type name="cm:content"> <subtype name="custom:mytype" /> </type> --> <types> <type name="cm:content"> <subtype name="smf:smartFolderTemplate" /> </type> <type name="cm:folder"> </type> <type name="trx:transferTarget"> <subtype name="trx:fileTransferTarget" /> </type> </types> <!-- If set, will present a WebDAV link for the current item on the Document and Folder details pages. Also used to generate the "View in Alfresco Explorer" action for folders. --> <repository-url>http://alfresco:8080/alfresco</repository-url> <!-- Google Docs™ integration --> <google-docs> <!-- Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions). --> <enabled>false</enabled> <!-- The mimetypes of documents Google Docs allows you to create via the Share interface. The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs™ Document --> <creatable-types> <creatable type="doc">application/vnd.openxmlformats-officedocument.wordprocessingml.document</creatable> <creatable type="xls">application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</creatable> <creatable type="ppt">application/vnd.ms-powerpoint</creatable> </creatable-types> </google-docs> <!-- File upload configuration --> <file-upload> <!-- Adobe Flash™ In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session. See: http://bugs.adobe.com/jira/browse/FP-4830 For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries. --> <adobe-flash-enabled>true</adobe-flash-enabled> </file-upload> </config>
05-25-2020 01:35 AM
Hi @mire323 ,
I have tried in similar way, but no luck.
Please find the screenshot attached.
Below is the configuration of share-config-custom.xml file.
<config evaluator="string-compare" condition="DocumentLibrary" replace="true"> <sorting> <sort label="Employee ID">emp:empId</sort> </sorting> <tree> <!-- Whether the folder Tree component should enumerate child folders or not. This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures. --> <evaluate-child-folders>false</evaluate-child-folders> <!-- Optionally limit the number of folders shown in treeview throughout Share. --> <maximum-folder-count>1000</maximum-folder-count> <!-- Default timeout in milliseconds for folder Tree component to recieve response from Repository --> <timeout>7000</timeout> </tree> <!-- Used by "Manage Rules" -> "Add aspect" action. If an aspect has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the aspect to be visible when creating rules: custom_customModel.aspect.custom_myaspect.title=My Aspect Used by the "Manage Aspects" action. For the aspect to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension: aspect.custom_myaspect=My Aspect --> <aspects> <!-- Aspects that a user can see --> <visible> <aspect name="cm:generalclassifiable" /> <aspect name="cm:complianceable" /> <aspect name="cm:dublincore" /> <aspect name="cm:effectivity" /> <aspect name="cm:summarizable" /> <aspect name="cm:versionable" /> <aspect name="cm:templatable" /> <aspect name="cm:emailed" /> <aspect name="emailserver:aliasable" /> <aspect name="cm:taggable" /> <aspect name="app:inlineeditable" /> <aspect name="cm:geographic" /> <aspect name="exif:exif" /> <aspect name="audio:audio" /> <aspect name="cm:indexControl" /> <aspect name="dp:restrictable" /> <aspect name="smf:customConfigSmartFolder" /> <aspect name="smf:systemConfigSmartFolder" /> </visible> <!-- Aspects that a user can add. Same as "visible" if left empty --> <addable> </addable> <!-- Aspects that a user can remove. Same as "visible" if left empty --> <removeable> </removeable> </aspects> <!-- Used by "Manage Rules" -> "Specialise type" action. If a type has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the type to be visible when creating rules: custom_customModel.type.custom_mytype.title=My SubType Used by the "Change Type" action. For the type to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension: type.custom_mytype=My SubType Define valid subtypes using the following example: <type name="cm:content"> <subtype name="custom:mytype" /> </type> --> <types> <type name="cm:content"> <subtype name="smf:smartFolderTemplate" /> </type> <type name="cm:folder"> </type> <type name="trx:transferTarget"> <subtype name="trx:fileTransferTarget" /> </type> </types> <!-- If set, will present a WebDAV link for the current item on the Document and Folder details pages. Also used to generate the "View in Alfresco Explorer" action for folders. --> <repository-url>http://localhost:8080/alfresco</repository-url> <!-- Google Docs™ integration --> <google-docs> <!-- Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions). --> <enabled>false</enabled> <!-- The mimetypes of documents Google Docs allows you to create via the Share interface. The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs™ Document --> <creatable-types> <creatable type="doc">application/vnd.openxmlformats-officedocument.wordprocessingml.document</creatable> <creatable type="xls">application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</creatable> <creatable type="ppt">application/vnd.ms-powerpoint</creatable> </creatable-types> </google-docs> <!-- File upload configuration --> <file-upload> <!-- Adobe Flash™ In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session. See: http://bugs.adobe.com/jira/browse/FP-4830 For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries. --> <adobe-flash-enabled>true</adobe-flash-enabled> </file-upload> </config>
<config evaluator="model-type" condition="emp:employeeDetails"> <forms> <form> <field-visibility> <show id="emp:empId" /> <show id="emp:firstName" /> <show id="emp:lastName" /> </field-visibility> <create-form template="../data-lists/forms/dataitem.ftl" /> <appearance> <field id="emp:empId" > <control template="/org/alfresco/components/form/controls/textfield.ftl" > </control> </field> <field id="emp:firstName" > <control template="/org/alfresco/components/form/controls/textarea.ftl"> </control> </field> <field id="emp:lastName"> <control template="/org/alfresco/components/form/controls/textarea.ftl"/> </field> </appearance> </form> </forms> </config> <config evaluator="node-type" condition="emp:employeeDetails"> <forms> <form> <field-visibility> <show id="emp:empId" /> <show id="emp:firstName" /> <show id="emp:lastName" /> </field-visibility> <create-form template="../data-lists/forms/dataitem.ftl" /> <appearance> <field id="emp:empId" > <control template="/org/alfresco/components/form/controls/textfield.ftl" > </control> </field> <field id="emp:firstName" > <control template="/org/alfresco/components/form/controls/textarea.ftl"> </control> </field> <field id="emp:lastName"> <control template="/org/alfresco/components/form/controls/textarea.ftl"/> </field> </appearance> </form> </forms> </config>
Thanks,
Hardik
05-25-2020 02:59 AM
Are there any errors in logs?
05-25-2020 06:20 AM
Not getting any errors in the logs as well browser console also.
Explore our Alfresco products with the links below. Use labels to filter content by product module.