cancel
Showing results for 
Search instead for 
Did you mean: 

Template and Actions

asv
Champ in-the-making
Champ in-the-making
Hello

Is it possible to show actions in Template for each document (like delete, edit)?

Is it possible to display sortable column names in a table?
1 REPLY 1

kevinr
Star Contributor
Star Contributor
It is possible for some actions. The issue is that the template output generated is "stateless" i.e. you will not be generating the usual stateful JSF components that we use to perform actions. We have a servlet (ExternalAccessServlet) that generates static URLs for browse and some action, there is also a "command" servlet that can be used to generate actions that execute workflow and scripts - additional action impls can be configured into the command servlet using Spring.
http://wiki.alfresco.com/wiki/URL_Addressability

Again, you would need to build commands or similar that perform these actions, this kind of thing is tricky in a stateless template.

Other options available to you is to use AJAX to create dynamic templates that use the Alfresco AJAX servlet to retrieve data outside of the usual JSF web-client framework. And in the next version of Alfresco 2.1 the first pass of a new feature called "Web Scripts" will be available:
http://wiki.alfresco.com/wiki/Web_Scripts

Web Scripts will allow non-java developers to create interactive pages that only require FreeMarker (or other) template pages plus JavaScript coding for the action implementation. And the entire web-script (templates+javascripts) can be configured into an existing Alfresco instance without rebuilding it etc.

Hope this helps,

Kevin