Hello,
I need to build a document-list with custom columns from a selected custom type.
workflow: select the custom type, search documents by property, list documents.
until the search documents i'm almost ok, I can present de result in document list but i would the custom columns
I see that for custom columns i need to write the html file but it's too static. I need to define the columns on runtime. I see the ADF Component Catalog DataTable component, but i don't understand how to define the columns in the document list component ADF Component Catalog .
Document List is based on Data Table component, so all documentation for Data Table applies. You can check docs on Data Adapters that allow to set both data and schema (columns) at runtime.
You can check the Data Table component from the component catalog DataTable component. In the given screenshot, the schema can be defined at runtime. So, on HTML page you need not require to specify the columns.
I've done it like this:
<adf-document-list [includeFields]="['properties']"> <data-columns> <data-column key="$thumbnail" type="image"></data-column> <data-column title="Name" key="name"> </data-column> <data-column title="CP1" key="properties.cp:customProperty1"> </data-column> <data-column title="CP2" key="properties.cp:customProperty2"> </data-column> </data-columns> </adf-document-list>
So set the includeFields property to include the properties and then use this format to specify the key: properties.cp:customProperty2.
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.