cancel
Showing results for 
Search instead for 
Did you mean: 

Adding custom ui action to action-group

buzman
Champ in-the-making
Champ in-the-making
Hi,
  I'm in the process of adding a custom ui action (*not* a folder action) to an existing action-group, and I need it to appear at a certain location (index) in the action group.

The existing action-group definition is the one for 'browse_actions_menu' :
<action-group id="browse_actions_menu">
  <action idref="details_space" />
  <action idref="delete_space" />
  <action idref="cut_node" />
  <action idref="copy_node" />
  <action idref="paste_all" />
  <action idref="manage_space_users" />
  <action idref="manage_space_rules" />
  <action idref="manage_deleted_items" />
</action-group>
… and I'd like my custom action to appear between details_space and delete_space.

What would be the best way to achieve this? Do I need to replicate the  whole action-group definition in my custom web-client properties file and add the action into the list :
<action-group id="browse_actions_menu">
  <action idref="details_space" />
  <action idref="my_custom_action" />
  <action idref="delete_space" />
  <action idref="cut_node" />
  <action idref="copy_node" />
  <action idref="paste_all" />
  <action idref="manage_space_users" />
  <action idref="manage_space_rules" />
  <action idref="manage_deleted_items" />
</action-group>
  or is there a more concise way?

Thanks
B
2 REPLIES 2

gavinc
Champ in-the-making
Champ in-the-making
Correct, you'll have to redefine the whole action-group to place your action where you want it.

buzman
Champ in-the-making
Champ in-the-making
Thanks Gavin.

One more question : if I need to change the evaluator class for one of the 'core' actions, do I need to duplicate the action definition in my custom config file as well, rather than just providing the 'override' evaluator classpath?

For instance, in my custom config file could I do this :

<action id="create_content">
  <evaluator>com.my.evaluator.class</evaluator>
</action>
or would I need to do this :
<action id="create_content">
  <permissions>
    <permission allow="true">CreateChildren</permission>
  </permissions>
  <evaluator>com.my.evaluator.class</evaluator>
  <label-id>create_content</label-id>
  <image>/images/icons/new_content.gif</image>
  <action>wizard:createContent</action>
</action>

Thanks
B