Get action id for action evaluated in ActionEvaluator impl

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 01:25 AM
Does any one know if it is possible to retrieve the action id for the action that is currently evaluated when an ActionEvaluator is executed?
I have for example the following action definition in my web-client-config:
Thanks in advance,
Bas
I have for example the following action definition in my web-client-config:
<action id="test_id"> <permissions> <permission allow="true">Write</permission> </permissions> <evaluator>nl.bua.alfresco.action.evaluator.ScriptableActionEvaluator</evaluator> <label>Test</label> <image>/images/icons/copy.gif</image> <action-listener> #{ActionHandlerBean.execute} </action-listener> <params> <param name="id">#{actionContext.id}</param> </params></action>
In my ScriptableActionEvaluator I'd like to retrieve the value 'test_id' when the evaluator evaluates this action.Thanks in advance,
Bas
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 01:44 AM
Hi,
action id will be unique across the system.
So if you write the unique actionlistener for each action then in your actionlistener you can findout what is the actionid
<action-listener>
#{ActionHandlerBean.execute}
</action-listener>
But what you are trying to do with the actionid?
Thanks,
Patil
Cignex Technologies
Bangalore
action id will be unique across the system.
So if you write the unique actionlistener for each action then in your actionlistener you can findout what is the actionid
<action-listener>
#{ActionHandlerBean.execute}
</action-listener>
But what you are trying to do with the actionid?
Thanks,
Patil
Cignex Technologies
Bangalore

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 05:21 AM
Hi Patil,
I want to use the action definition for the action that is being evaluated in my ActionEvaluator implmentation to read a parameter.
Like this:
It is just for the evaluator and not part of the action execution that is done in the actionhandler.execute() method.
Kind regards,
Bas
I want to use the action definition for the action that is being evaluated in my ActionEvaluator implmentation to read a parameter.
Like this:
ActionService service = Repository.getServiceRegistry(context).getActionService();ActionDefinition actionDefinition = service.getActionDefinition("test_id");
But in order to be able to read the definition I need the action id ('test_id').It is just for the evaluator and not part of the action execution that is done in the actionhandler.execute() method.
Kind regards,
Bas

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2011 09:22 AM
HI,
Check the config service, u might get some method.
Thanks,
Patil
Cignex Technologies
Bangalore
Check the config service, u might get some method.
Thanks,
Patil
Cignex Technologies
Bangalore
