@Name(value="webActions") @Scope(value=CONVERSATION) @Install(precedence=10) public class WebActionsBean extends Object implements WebActions, Serializable
AJAX_TAB_PROPERTY, CURRENT_TAB_CHANGED_EVENT, CURRENT_TAB_SELECTED_EVENT, DEFAULT_TABS_CATEGORY, DOCUMENTS_MAIN_TAB_ID, MAIN_TAB_ID_PARAMETER, MAIN_TABS_CATEGORY, NULL_TAB_ID, SUBTAB_CATEGORY_SUFFIX, TAB_IDS_PARAMETER| Constructor and Description |
|---|
WebActionsBean() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUseAjaxTabs()
Returns true if history push state is supported by browser.
|
boolean |
checkFilter(String filterId) |
Action |
getAction(String actionId,
ActionContext context,
boolean hideUnavailableAction) |
Action |
getAction(String actionId,
boolean hideUnavailableAction) |
Action |
getActionForDocument(String actionId,
DocumentModel document,
boolean hideUnavailableAction)
Return action with given id, with context filled with given document.
|
List<Action> |
getActionsList(String category)
Returns all filtered actions for a given category, creating a new context for the filters resolution.
|
List<Action> |
getActionsList(String category,
ActionContext context)
Returns all filtered actions for a given category and given resolution context.
|
List<Action> |
getActionsList(String category,
ActionContext context,
boolean hideUnavailableAction)
Returns all filtered actions for a given category and given resolution context.
|
List<Action> |
getActionsList(String category,
Boolean hideUnavailableAction)
Returns all filtered actions for a given category and given resolution context, creating a new context for the
filters resolution.
|
List<Action> |
getActionsListForDocument(String category,
DocumentModel document,
boolean hideUnavailableAction)
Returns all filtered actions for a given category and a context built with given current document context,
creating a new context for the filters resolution.
|
List<Action> |
getAllActions(String category)
Returns all actions for a given category, without filtering.
|
String |
getCurrentLifeCycleState()
Deprecated.
|
Action |
getCurrentSubTabAction()
Returns the current sub tab for a category computed from the current tab action id and the suffix
WebActions.SUBTAB_CATEGORY_SUFFIX. |
Action |
getCurrentSubTabAction(String parentActionId)
Returns the current sub tab action for given parent action, computing the category from parent action id with
suffix
WebActions.SUBTAB_CATEGORY_SUFFIX. |
String |
getCurrentSubTabId()
Returns the current sub tab id for a category computed from the current tab action id and the suffix
WebActions.SUBTAB_CATEGORY_SUFFIX. |
Action |
getCurrentTabAction()
Returns the current action for category
WebActions.DEFAULT_TABS_CATEGORY |
Action |
getCurrentTabAction(String category)
Returns the current action for given category.
|
String |
getCurrentTabId()
Returns the current action id for category
WebActions.DEFAULT_TABS_CATEGORY |
String |
getCurrentTabId(String category)
Returns the current action id for given category
|
String |
getCurrentTabIds()
Returns current tab ids as a string, encoded as is: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2,...
|
List<Action> |
getSubTabsList()
Returns filtered actions for a category computed from the current tab action id and the suffix
WebActions.SUBTAB_CATEGORY_SUFFIX. |
List<Action> |
getSubViewActionsList()
Deprecated.
|
List<Action> |
getTabsList()
Returns filtered actions for the category
WebActions.DEFAULT_TABS_CATEGORY |
List<Action> |
getUnfiltredActionsList(String category)
Returns all actions for a given category, creating a new context for the filters resolution.
|
List<Action> |
getUnfiltredActionsList(String category,
ActionContext context)
Returns all actions for a given category and given resolution context.
|
boolean |
hasCurrentTabId(String category)
Indicates if the current tab id is set for given category
|
void |
resetCurrentTab()
Resets current tab information (includes sub tab information) for category
WebActions.DEFAULT_TABS_CATEGORY. |
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
WebActions.SUBTAB_CATEGORY_SUFFIX. |
void |
resetTabList()
Resets actions resolved for category
WebActions.DEFAULT_TABS_CATEGORY so that they're recomputed. |
void |
selectTabAction()
Deprecated.
|
void |
setCurrentSubTabAction(Action tabAction)
Sets the current sub tab for a category computed from the current tab action id and the suffix
WebActions.SUBTAB_CATEGORY_SUFFIX. |
void |
setCurrentSubTabId(String tabId)
Sets the current sub tab id for a category computed from the current tab action id and the suffix
WebActions.SUBTAB_CATEGORY_SUFFIX. |
void |
setCurrentTabAction(Action currentTabAction)
Sets the current action for category
WebActions.DEFAULT_TABS_CATEGORY |
void |
setCurrentTabAction(String currentTabActionId)
Deprecated.
|
void |
setCurrentTabAction(String category,
Action tabAction)
Sets the current action for given category.
|
String |
setCurrentTabAndNavigate(DocumentModel document,
String currentTabActionId)
Navigate to the given document and opens the view page of the given document selecting the given tab.
|
String |
setCurrentTabAndNavigate(String currentTabActionId)
Calls
WebActions.setCurrentTabAndNavigate(DocumentModel, String) for the current document. |
void |
setCurrentTabId(String tabId)
Sets the current action id for category
WebActions.DEFAULT_TABS_CATEGORY. |
void |
setCurrentTabId(String category,
String tabId,
String... subTabIds)
Sets the current action for given category, with additional sub tabs.
|
void |
setCurrentTabIds(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]...]
|
void |
setSubTabsList(List<Action> tabsList)
Deprecated.
|
void |
setTabsList(List<Action> tabsList)
Deprecated.
|
boolean |
useAjaxTabs()
Returns true if ajaxified behaviour of tabs is activated on the server, and if history push state is supported by
browser.
|
public List<Action> getActionsList(String category, ActionContext context, boolean hideUnavailableAction)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionspublic List<Action> getActionsList(String category, Boolean hideUnavailableAction)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionspublic List<Action> getActionsList(String category, ActionContext context)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionspublic List<Action> getActionsListForDocument(String category, DocumentModel document, boolean hideUnavailableAction)
WebActionsActions are filtered according to filters set on the actions definitions.
Since 5.8, the category can be a list of categories, separated by commas.
getActionsListForDocument in interface WebActionspublic List<Action> getActionsList(String category)
WebActionsSince 5.8, the category can be a list of categories, separated by commas.
getActionsList in interface WebActionsWebActions.getActionsList(String, ActionContext)public List<Action> getUnfiltredActionsList(String category, ActionContext context)
WebActionsActions are not filtered according to filters set on the actions definitions: actions that should have been removed are just marked as non-available.
Since 5.8, the category can be a list of categories, separated by commas.
getUnfiltredActionsList in interface WebActionspublic List<Action> getUnfiltredActionsList(String category)
WebActionsSince 5.8, the category can be a list of categories, separated by commas.
getUnfiltredActionsList in interface WebActionsWebActions.getUnfiltredActionsList(String, ActionContext)public List<Action> getAllActions(String category)
WebActionsgetAllActions in interface WebActionspublic Action getAction(String actionId, boolean hideUnavailableAction)
getAction in interface WebActionsActionManager.getAction(String, ActionContext, boolean)public Action getActionForDocument(String actionId, DocumentModel document, boolean hideUnavailableAction)
WebActionsgetActionForDocument in interface WebActionsActionManager.getAction(String, ActionContext, boolean)public Action getAction(String actionId, ActionContext context, boolean hideUnavailableAction)
getAction in interface WebActionsActionManager.getAction(String, ActionContext, boolean)public boolean checkFilter(String filterId)
checkFilter in interface WebActionsActionManager.checkFilter(String, ActionContext)public Action getCurrentTabAction(String category)
WebActionsgetCurrentTabAction in interface WebActionspublic void setCurrentTabAction(String category, Action tabAction)
WebActionsIf given action is null, it resets the current action for this category.
setCurrentTabAction in interface WebActionspublic Action getCurrentSubTabAction(String parentActionId)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getCurrentSubTabAction in interface WebActionspublic String getCurrentTabId(String category)
WebActionsgetCurrentTabId in interface WebActionspublic boolean hasCurrentTabId(String category)
WebActionshasCurrentTabId in interface WebActionspublic void setCurrentTabId(String category, String tabId, String... subTabIds)
WebActionssetCurrentTabId in interface WebActionspublic String getCurrentTabIds()
WebActionsgetCurrentTabIds in interface WebActionspublic void setCurrentTabIds(String tabIds)
WebActions
If category is omitted or empty, the category WebActions.DEFAULT_TABS_CATEGORY will be used (if there is no subtab
information).
The resulting string looks like: CATEGORY_1:ACTION_ID_1,CATEGORY_2:ACTION_ID_2_SUB_ACTION_ID_2,...
setCurrentTabIds in interface WebActionspublic void resetCurrentTabs()
WebActionsresetCurrentTabs in interface WebActionspublic void resetCurrentTabs(String category)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.resetCurrentTabs in interface WebActionspublic void resetCurrentTab()
WebActionsWebActions.DEFAULT_TABS_CATEGORY.resetCurrentTab in interface WebActions@Observer(value={"userAllDocumentTypesSelectionChanged","locationSelectionChanged"},
create=false)
@BypassInterceptors
public void resetTabList()
WebActionsWebActions.DEFAULT_TABS_CATEGORY so that they're recomputed. Also calls
WebActions.resetCurrentTab()resetTabList in interface WebActions@Factory(value="tabsActionsList",
scope=EVENT)
public List<Action> getTabsList()
WebActionsWebActions.DEFAULT_TABS_CATEGORYgetTabsList in interface WebActions@Factory(value="subTabsActionsList",
scope=EVENT)
public List<Action> getSubTabsList()
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getSubTabsList in interface WebActions@Factory(value="currentTabAction",
scope=EVENT)
public Action getCurrentTabAction()
WebActionsWebActions.DEFAULT_TABS_CATEGORYgetCurrentTabAction in interface WebActionspublic void setCurrentTabAction(Action currentTabAction)
WebActionsWebActions.DEFAULT_TABS_CATEGORYsetCurrentTabAction in interface WebActions@Factory(value="currentSubTabAction",
scope=EVENT)
public Action getCurrentSubTabAction()
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getCurrentSubTabAction in interface WebActionspublic void setCurrentSubTabAction(Action tabAction)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.setCurrentSubTabAction in interface WebActionspublic String getCurrentTabId()
WebActionsWebActions.DEFAULT_TABS_CATEGORYgetCurrentTabId in interface WebActionspublic void setCurrentTabId(String tabId)
WebActionsWebActions.DEFAULT_TABS_CATEGORY.
Does nothing if tabId is null, but resets current tab for this category when using an empty string instead.
setCurrentTabId in interface WebActionspublic String getCurrentSubTabId()
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.getCurrentSubTabId in interface WebActionspublic void setCurrentSubTabId(String tabId)
WebActionsWebActions.SUBTAB_CATEGORY_SUFFIX.
Does nothing if sub tab id is null, but resets current tab for this category when using an empty string instead.
setCurrentSubTabId in interface WebActionspublic String setCurrentTabAndNavigate(String currentTabActionId)
WebActionsWebActions.setCurrentTabAndNavigate(DocumentModel, String) for the current document.
Given action should hold the category WebActions.DEFAULT_TABS_CATEGORY
setCurrentTabAndNavigate in interface WebActionsNavigationContext.getCurrentDocument()public String setCurrentTabAndNavigate(DocumentModel document, String currentTabActionId)
WebActions
Given action should hold the category WebActions.DEFAULT_TABS_CATEGORY
setCurrentTabAndNavigate in interface WebActionsdocument - to document which will be shown in the view pagecurrentTabActionId - the tab that will be selected in the view page@Deprecated public List<Action> getSubViewActionsList()
getSubViewActionsList in interface WebActions@Deprecated public void selectTabAction()
selectTabAction in interface WebActions@Deprecated public String getCurrentLifeCycleState() throws ClientException
getCurrentLifeCycleState in interface WebActionsClientException@Deprecated public void setTabsList(List<Action> tabsList)
setTabsList in interface WebActions@Deprecated public void setSubTabsList(List<Action> tabsList)
setSubTabsList in interface WebActions@Deprecated public void setCurrentTabAction(String currentTabActionId)
setCurrentTabAction in interface WebActions@Factory(value="useAjaxTabs",
scope=SESSION)
public boolean useAjaxTabs()
WebActionsuseAjaxTabs in interface WebActionsWebActions.AJAX_TAB_PROPERTY,
WebActions.canUseAjaxTabs()@Factory(value="canUseAjaxTabs",
scope=SESSION)
public boolean canUseAjaxTabs()
WebActionscanUseAjaxTabs in interface WebActionsWebActions.useAjaxTabs()Copyright © 2015 Nuxeo SA. All rights reserved.