Actions Grouping

There is a possibility to group actions and display them according to the group configuration.

There are three types of action group: a group, an extended group, and a split group.

Group Description

Group- a regular group to display actions in a row, one action next to another.

Simple Group

Extended Group (extended-group) - displays a single icon called extended-action for all actions belonging to the group. The actual actions are displayed in a popup which is visible once the extended-action is invoked. The extended-action does not perform any action itself. It only shows the popup window. The purpose of extended-action is to provide an icon for the group. It can be any action of all available actions in the framework. There can be also used an action which is already in the action list of the current extended-group. There is only one mandatory action extended-action in one extended-group.

Extended Group

Split Group (split-group) - displays a single icon with an actual action called primary-action for all actions belonging to the group. Invoking the primary-action actually performs the action. To display a popup with all other actions, the user has to click the Expand the Dropdown List button. The purpose of the split-action is to provide icons for the group and to provide the logic once the action is performed. It can be any action of all available actions in the framework. There is only one mandatory primary-action in one split-group.

Split Group

Below, you can find a code snippet with an example of actions groups configuration.

cockpit-config.xml

<?xml version="1.0" encoding="UTF-8"?><config xmlns="http://www.hybris.com/cockpit/config">
  <context type="CatalogVersion" component="editorareaactions" module="platformbackoffice">
    <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris">
      <y:group qualifier="common" show-group-header="false">
        <y:label>actiongroup.common</y:label>
        <y:action action-id="com.hybris.cockpitng.action.delete" property="selectedObjects"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversionreport" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversiondiff" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.duplicatecatalogids" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogsynchronization" property="currentObject"/>
        <y:action action-id="com.hybris.backoffice.widgets.actions.sync" property="currentObject"/>
            </y:group>
      <y:split-group qualifier="common2" show-group-header="false">
        <y:label>actiongroup.common</y:label>
        <y:action action-id="com.hybris.cockpitng.action.delete" property="selectedObjects"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversionreport" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversiondiff" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.duplicatecatalogids" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogsynchronization" property="currentObject"/>
        <y:action action-id="com.hybris.backoffice.widgets.actions.sync" property="currentObject"/>
        <y:primary-action action-id="com.hybris.backoffice.widgets.actions.sync" property="currentObject" />
      </y:split-group>
      <y:split-group qualifier="common3">
        <y:label>actiongroup.common</y:label>
        <y:action action-id="com.hybris.cockpitng.action.delete" property="selectedObjects"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversionreport" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversiondiff" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.duplicatecatalogids" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogsynchronization" property="currentObject"/>
        <y:primary-action action-id="com.hybris.backoffice.widgets.actions.sync" property="currentObject"/>
      </y:split-group>
      <y:extended-group qualifier="common5" show-group-header="false">
        <y:label>actiongroup.common</y:label>
        <y:action action-id="com.hybris.cockpitng.action.delete" property="selectedObjects"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversionreport" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversiondiff" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.duplicatecatalogids" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogsynchronization" property="currentObject"/>
        <y:extended-action action-id="com.hybris.backoffice.widgets.actions.sync" property="currentObject"/>
      </y:extended-group>
      <y:three-dots-group qualifier="common6">
        <y:action action-id="com.hybris.cockpitng.action.delete" property="selectedObjects"/>  
        <y:action action-id="com.hybris.cockpitng.action.catalogversionreport" property="currentObject"/>
        <y:action action-id="com.hybris.cockpitng.action.catalogversiondiff" property="currentObject"/>
      </y:three-dots>
        </y:actions>
  </context>
</config>

Three Dots Group

If you want to achieve a menu-like action group, opened with a three-dots icon that imitates a button, you can use this grouping. The actions are displayed in a popup which is visible once the three-dots icon is clicked.

Group Tag Settings

  1. show-group-header
    • Type: boolean
    • Description: Every action group required a qualifier attribute. Its value can be displayed next to the actions icons, or it can be hidden.
  2. show-separator
    • Type: boolean
    • Description: By default, the action groups are separated with a vertical bar | sign. It can be hidden using the show-separator setting.
  3. position
    • Type: integer
    • Description: Position of a group in the group collection.