Action with Custom Attributes
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2007 10:39 AM
Hello,
I want to launch a servlet when the user clicks on a specific menu.
I decided to create a new action.
This action is applied on a document.
I define the following action in the file 'web-client-config-custom.xml':
<action id="view_coffre_fort_watermark">
<label-id>view_coffre_fort_watermark</label-id>
<image>/images/icons/view_coffre_fort_watermark.gif</image>
<href>http://localhost:8080/AlfrescoViewer/ViewerServlet</href>
<target>new</target>
<params>
<param name="isWithWaterMark">true</param>
<param name="id">#{actionContext.id}</param>
</params>
</action>
But I want to add some parameters like document custom properties values to my servlet.
What is the correct syntax of the tag <param>?
Thanks a lot for your help,
Luc
I want to launch a servlet when the user clicks on a specific menu.
I decided to create a new action.
This action is applied on a document.
I define the following action in the file 'web-client-config-custom.xml':
<action id="view_coffre_fort_watermark">
<label-id>view_coffre_fort_watermark</label-id>
<image>/images/icons/view_coffre_fort_watermark.gif</image>
<href>http://localhost:8080/AlfrescoViewer/ViewerServlet</href>
<target>new</target>
<params>
<param name="isWithWaterMark">true</param>
<param name="id">#{actionContext.id}</param>
</params>
</action>
But I want to add some parameters like document custom properties values to my servlet.
What is the correct syntax of the tag <param>?
Thanks a lot for your help,
Luc
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2007 01:05 PM
The 'actionContext' object represents an Alfresco client Node wrapper object. So it should be possible to retrieve the properties of an item using the following syntax:
Either:
#{actionContext['cm:name']}
Or maybe (can't remember if this will work)
#{actionContext.properties['cm:name']}
And replace 'cm:name' with your custom property uri
ropertyname as appropriate.
Thanks,
Kevin
Either:
#{actionContext['cm:name']}
Or maybe (can't remember if this will work)
#{actionContext.properties['cm:name']}
And replace 'cm:name' with your custom property uri

Thanks,
Kevin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2007 08:03 AM
thanks a lot.
It works 😉
It works 😉
