Introduction
First, we will create a very simple dashlet and we will extend that to be configurable.
Copy these files into the "tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets" folder.
HelloWorldDashlet.get.html.ftl
HelloWorldDashlet.get.desc.xml
HelloWorldDashlet.get.js
The output of the code above is:
Now we will configure the "welcome" message. For this, we need to make changes to this HelloWorldDashlet.
Add a configuration file for HelloWorldDashlet as "HelloWorldDashlet.get.config.xml".
HelloWorldDashlet.get.config.xml
Make the following change in the HelloWorldDashlet.get.js file.
- Read the greeting message from the "HelloWorldDashlet.get.config.xml" file.
- Add the greeting message into the model.
Now for the changes in the "HelloWorldDashlet.get.html.ftl" file.
Add the following "<script type ="text/javascript"> a </script>" part.
Please find the attached source code.
Hope this helps someone.