Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.ui.web.api
Class TabActionsSelection

java.lang.Object
  extended by org.nuxeo.ecm.platform.ui.web.api.TabActionsSelection
All Implemented Interfaces:
Serializable

public class TabActionsSelection
extends Object
implements Serializable

Handles selected action tabs and raised events on current tab change.

Since:
5.4.2
See Also:
WebActions.CURRENT_TAB_CHANGED_EVENT, Serialized Form

Constructor Summary
TabActionsSelection()
           
 
Method Summary
 Action getCurrentTabAction(String category)
          Returns the current action for given category.
 String getCurrentTabId(String category)
           
 String getCurrentTabIds()
          Returns current tab ids as a string, encoded as is: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2:SUBTAB_ACTION_ID_2,...
static String getSubTabCategory(String parentActionId)
           
 void resetCurrentTabs()
          Resets all current tabs information.
 void resetCurrentTabs(String category)
          Resets current tabs for given category, taking subtabs into account by resetting actions in categories computed from reset actions id with suffix #SUBTAB_CATEGORY_SUFFIX.
 void setCurrentTabAction(String category, Action tabAction)
          Sets the current action for given category, with additional sub tabs.
 void setCurrentTabId(ActionManager actionManager, ActionContext actionContext, String category, String tabId, String... subTabIds)
           
 void setCurrentTabIds(ActionManager actionManager, ActionContext actionContext, String tabIds)
          Sets current tab ids as a String, splitting on commas ',' and parsing each action information as is: CATEGORY:[ACTION_ID[:OPTIONAL_SUB_ACTION_ID[:OPTIONAL_SUB_ACTION_ID]...]]
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabActionsSelection

public TabActionsSelection()
Method Detail

getCurrentTabAction

public Action getCurrentTabAction(String category)
Returns the current action for given category.


setCurrentTabAction

public void setCurrentTabAction(String category,
                                Action tabAction)
Sets the current action for given category, with additional sub tabs.

If given action is null, it resets the current action for this category.


getCurrentTabId

public String getCurrentTabId(String category)

setCurrentTabId

public void setCurrentTabId(ActionManager actionManager,
                            ActionContext actionContext,
                            String category,
                            String tabId,
                            String... subTabIds)

getCurrentTabIds

public String getCurrentTabIds()
Returns current tab ids as a string, encoded as is: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2:SUBTAB_ACTION_ID_2,...

Since:
5.4.2

setCurrentTabIds

public void setCurrentTabIds(ActionManager actionManager,
                             ActionContext actionContext,
                             String tabIds)
Sets current tab ids as a String, splitting on commas ',' and parsing each action information as is: CATEGORY:[ACTION_ID[:OPTIONAL_SUB_ACTION_ID[:OPTIONAL_SUB_ACTION_ID]...]]

If category is omitted or empty, the category #DEFAULT_TABS_CATEGORY will be used (if there is no subtab information).

If no action id is given, the corresponding category is reset (for instance using 'CATEGORY:').

If the action information is '*:', all categories will be reset.

The resulting string looks like: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2_SUB_ACTION_ID_2,...

Since:
5.4.2

resetCurrentTabs

public void resetCurrentTabs()
Resets all current tabs information.

Since:
5.4.2

resetCurrentTabs

public void resetCurrentTabs(String category)
Resets current tabs for given category, taking subtabs into account by resetting actions in categories computed from reset actions id with suffix #SUBTAB_CATEGORY_SUFFIX.


getSubTabCategory

public static String getSubTabCategory(String parentActionId)

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.