I'm new on aikau development. My current small-project is to create a document list dashlet which the data come from my simple webscript that deployed to Repository (not to classpath). This webscript is return JSON data format and works normally (as single webscript page or application outside of Alfresco dashboard).
The simple dashlet I will build is as follow:
*It only shows part of current document properties.
The requirements for that dashlet are:
- Select a Department from drop down list will request a HTTP REST API, such as on simple select HTML code:
<option value="/alfresco/service/suj/docnotify/deeds.json?usergroup=SUJ_HO_FINANCE">Finance (HO)</option>
- The default selection is select "All User Group" which will query all documents from whole departments, and the result will create a default table query result (all docs from all user groups).
- The "Download as CSV" button will request a HTTP REST API with similar URI above (#1) with only different on its extension (.csv). It will download document list in csv format for selected department.
- The content area (table view) is the result which parse JSON data and display as table.
Following are my study resources on aikau dashlet and widget development for this task:
- Adding Views to Filtered Search
- Aikau Widget Reference
- Aikau Dashlets
- How to Create an Aikau Dashlet for Share by Dave Draper
Until now I successfully created dashlet below:
*the logo is only for my demo of "alfresco/layout/VerticalWidgets".
With above conditions I achieved, I have some questions remaining of development to finish:
- How to populate the selections (options parameter) of drop down list? This DropDownButton documentation not made me clear on how to create the options. How we create the options like HTML code above? and return a JSON back. Or I got wrong component/module instead of DropDownButton?
- For the widget below the toolbar as the result area (table view). I just create only the HEADER (widgetsForHeader above of widgetsForBody block). This header is not shown, because I haven't created the right "table" which can capture the JSON data (CMIIW). But I already prepared it with development and documentations of: “alfresco/documentlibrary/views/layouts/Row”, “alfresco/documentlibrary/views/layouts/Cell”, “alfresco/renderers/SearchResultPropertyLink”, “alfresco/renderers/Property”. It refer to my #1 study link above. Is it a right path to create this table widget result?