11-06-2016 12:22 PM
Hi,
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:
Following are my study resources on aikau dashlet and widget development for this task:
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:
Thank you,
[bayu]
11-07-2016 04:46 AM
OK... I might need some additional information to get you to the end of the path, but this is a very comprehensive question, so thanks for providing as much detail as you have.
With regards to the DropDownButton...
The main thing to understand is that Aikau operates over a publication/subscription model. The DropDownButton is for a very specific use case in which a button can contain a widget model for rendering more complex than a simple options menu. What you probably actually want to be using is a Select widget which is a representation of a more traditional HTML select (there are more complex variations available like FilteringSelect and MultiSelectInput). These are form controls so when they have their value changed they will publish the change on a specific topic. If the content of your list changes according to the selected item in the drop-down then you should look to use a AlfFilteredList and use the drop-down form control to trigger reloading of data. An example of how to configure an AlfFilteredList with external filter contols can be found in the unit test application - see this test page controller.
The idea would be that each option in the drop-down has a label and value attribute and when the selected item is changed, the AlfFilteredList detects that change and makes a request to load a new set of data based on the value selected.
For the "Download CSV" button - it sounds like what you require is that the payload published when the button is clicked should change depending upon the user group selected. I would recommend that you use the AlfDynamicPayloadButton as this can be configured (as the name suggests) to change the payload published on clicked based on other publications made within the page. This would allow your button to request to download based on the item selected from the drop-down.
Finally... It sounds like you're on the right track with your table, however I'd question your use of the SearchResultPropertyLink unless your dashlet truly is rendering search results. Otherwise you may want to just use the PropertyLink widget.
Hopefully this information is of use... the one educational resource you didn't mention is the Aikau tutorial - if you've not worked through it yet and are new to Aikau development then I would definitely recommend it.
11-07-2016 05:09 PM
Hi Dave,
Thank you for your answer, reviewing and suggestions. It really helps a beginner like me.
Aikau tutorial is forgot to mention, yes it's also one of my resource, the example codes there are really valuable.
OK, I will back to my dev and raise if any problems here.
Again, thank you!
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.