Compound Actions: oxy_compound_action() Function

This function allows you to define multiple actions that will be executed sequentially.

The oxy_compound_action() function is used from the oxy_button() form control function or the oxy_buttonGroup() form control function.

The arguments received by the oxy_compound_action() function are a list of actions (executed sequentially) that are defined with the oxy_action() function.

You can use three optional properties (name, description, icon) in the oxy_compound_action() function to provide labels for the compound action. If you do not specify these three properties, those same properties defined in the first oxy_action function will be used for the labels.

The oxy_getActionName, oxy_getActionDescription, and oxy_getActionIcon functions accept the following 2 parameters:
Example: oxy_compound_action Function
oxy_button(
    action, 
        oxy_compound_action(
        name, oxy_getActionName('framework.id', 'Fallback'), 
        description, 'Inserts a paragraph and uses form controls to edit its @audience attribute', 
        icon, url('http://www.oxygenxml.com/img/icn_oxy20.png'), 
        oxy_action(
            name, 'Insert', 
            description, 'Insert an element after the current one', 
            operation, 'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation', 
            icon, url('insert.png'), 
            arg-fragment, "<p audience=''></p>", 
            arg-insertLocation, '.', 
            arg-insertPosition, 'After'
        ), 
        oxy_action(
            name, 'Activate edit mode', 
            description, 'Sets a pseudo class that will activate a CSS rule that will present a text field form control for the @audience attribute', 
            operation, 'SetPseudoClassOperation', 
            arg-name, 'edit-mode-on', 
            arg-elementLocation, '.'
        )
        )
, showIcon, true)
Tip: A code template is available to make it easy to add the oxy_compound_action function with the Content Completion Assistant by pressing Ctrl + Space and select the oxy_action_list code template.