cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Icons for a Custom Action

timothy_michael
Champ in-the-making
Champ in-the-making
I've developed a custom action executer which extends ActionExecuterAbstractBase. I've tested this action by pulling up "Run Action", and it works as expected. Now, I need to add an icon for the action to the space_browse and browse_actions_menu action groups.

My expectation is that I can add an icon that will take me directly to the parameters page for that action. But none of the examples I've found on this forum for adding icons to this group call an action that's been built to run in the ActionExecuter framework. Is it not possible?  Do I need to refactor my action to not run under this framework?

Also, a quick question on the evaluator: Is the evaluator run when the system displays an icon, or tries to run the action attached to the icon? Ideally, I wouldn't want the icon to show up on spaces without a particular aspect, and I'm trying to figure out the best way to do this.

Thanks in advance!
3 REPLIES 3

gavinc
Champ in-the-making
Champ in-the-making
You'll need to create a separate dialog and JSP page to run the action outside of the "Run Action" wizard.

The evaluator is run when the icon is displayed, in fact the Evaluator class is used to decide whether the action icon is displayed or not so it's fairly easy to check whether the aspect is present and hence show the icon. There are several examples in the org.alfresco.web.action.evaluator package.

timothy_michael
Champ in-the-making
Champ in-the-making
You'll need to create a separate dialog and JSP page to run the action outside of the "Run Action" wizard.

Is there an example of this somewhere in the Alfresco source, or on the Wiki? I haven't been able find anything similar in my searches.

The evaluator is run when the icon is displayed, in fact the Evaluator class is used to decide whether the action icon is displayed or not so it's fairly easy to check whether the aspect is present and hence show the icon. There are several examples in the org.alfresco.web.action.evaluator package.

Thanks - I'll look into it.

gavinc
Champ in-the-making
Champ in-the-making
http://wiki.alfresco.com/wiki/Adding_a_Custom_Dialog gives an example of adding a custom JSP page launched from a new action icon.