cancel
Showing results for 
Search instead for 
Did you mean: 

How to place a link into FreeMarker that executes an action?

asianirish
Champ in-the-making
Champ in-the-making
As I found out standard links executing actions (like menu items and icons under nodes) are built at the server side and contains a code like this:
<a href="#" 
onclick="document.forms['browse']['browse:act'].value='browse:delete_docid_7231';
document.forms['browse']['ref'].value='workspace://SpacesStore/5279c0c2-28d6-4ea6-9d99-44ed7b63d299';
document.forms['browse']['id'].value='5279c0c2-28d6-4ea6-9d99-44ed7b63d299';
document.forms['browse'].submit();
return false;" 


(actually it fills out hidden form elements and than sumbits the form)
I cannot put this link into .ftl directly because I cannot foresee which postfix I should use after action id (like a value 'browse:delete_docid_7231' above mentioned)
Is it possible to generate a link like this by FreeMarker or JavaScript functions?

Or mayby any other ways to execute actions by user command for instance making buttons etc?
1 REPLY 1

witho
Champ on-the-rise
Champ on-the-rise
Hi,

I have a similar problem. My situation is tha i would like to add a link / button in MySpaces Portlet that lets me to create content in the current node, just like the action "Create Content" in the Alfresco Client Portlet.

Did you find any solution to this problem??

Thanks a lot!. Bye