How add list headers to AlfDocumentListView in aik

2019-09-11 08:04发布

问题:

Consider this example. It has the following lines:

var views = [
   {
      name: "alfresco/documentlibrary/views/AlfDocumentListView",
      config: {
         widgets: [
            {
               id: "VIEW_ROW",
               name: "alfresco/documentlibrary/views/layouts/Row",
               config: {
                  widgets: [
                     {
                        name: "alfresco/documentlibrary/views/layouts/Cell",
                        config: {
                           widgets: [
                              {
                                 id: "DATA_LIST_TITLE",
                                 name: "alfresco/renderers/Property",
                                 config: {
                                    propertyToRender: "title"
                                 }
                              }
                           ]
                        }
                     }
                  ]
               }
            }
         ]
      }
   }
];

This show just list of data, but without any headers. What to add to AlfDocumentListView to make it show headers?

回答1:

I would suggest that you work through the Aikau tutorial on GitHub (see https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/About.md) I think that you'll find that it has a lot more useful information on Aikau than the official documentation. The answer to your specific question is actually addressed in chapter 10 of the tutorial: https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/Tutorial10.md

I would also recommend that you take advantage of the Alfresco Community platform (https://community.alfresco.com/) you're likely to get more responses there than on StackOverflow as it has a larger audience on Aikau related issues. I'd also recommend reviewing the many blog posts I've written on Aikau (https://community.alfresco.com/community/ecm/blog/authors/ddraper) as you may find they contain a lot of useful information