AnsweredAssumed Answered

Apply a custom action for all space content

Question asked by redbull on Aug 16, 2012
Latest reply on Aug 28, 2012 by redbull
Hi all,
starting from code sample included in Jeff Pott "Alfresco Developer Guide" I have write in Alfresco Explorer (3.2) a custom action that apply to space level and to content level:

         <!– Add action to more actions menu for each space –>
         <!– http://wiki.alfresco.com/wiki/Action_group –>
         <action-group id="space_browse">
            <action idref="setFlag" />
         </action-group>
         <action-group id="document_browse">
            <action idref="setFlag" />
         </action-group>
         <action-group id="document_browse_menu">
            <action idref="setFlag" />
         </action-group>
         <action-group id="doc_details_actions">
            <action idref="setFlag" />
         </action-group>


This action essentially sets a flag (true/false) and it work fine at document level.
My next implementation:
when the user select the action at space level then the custom action should be applied in cycle to its content. So, I need to get the node type and if it is a "Space node" then execute the action to all the content (1 or more file).
Please, can you suggest some code to test node type?
Thanks!

Outcomes