public class AlfrescoNavigationHandler extends NavigationHandler
Modifier and Type | Field and Description |
---|---|
static String |
CLOSE_DIALOG_OUTCOME |
static String |
CLOSE_MULTIPLE_END |
static String |
CLOSE_MULTIPLE_START |
static String |
CLOSE_WIZARD_OUTCOME |
static String |
DIALOG_PREFIX |
protected String |
dialogContainer |
static String |
EXTERNAL_CONTAINER_SESSION |
static String |
OUTCOME_BROWSE |
static String |
OUTCOME_SEPARATOR |
protected String |
plainDialogContainer |
protected String |
plainWizardContainer |
static String |
WIZARD_PREFIX |
protected String |
wizardContainer |
Constructor and Description |
---|
AlfrescoNavigationHandler(NavigationHandler origHandler)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCurrentViewToStack(FacesContext context)
Adds the current view to the stack (if required).
|
protected DialogsConfigElement.DialogConfig |
getDialogConfig(FacesContext context,
String name,
Node dispatchContext)
Returns the dialog configuration object for the given dialog name.
|
protected String |
getDialogContainer(FacesContext context)
Retrieves the configured dialog container page
|
protected Node |
getDispatchContextNode(FacesContext context)
Returns the node currently in the dispatch context
|
protected int |
getNumberToClose(String outcome) |
protected String |
getOutcomeOverride(String outcome)
Returns the overridden outcome.
|
protected String |
getViewIdFromStackObject(FacesContext context,
Object topOfStack)
Returns the view id of the given item retrieved from the view stack.
|
protected WizardsConfigElement.WizardConfig |
getWizardConfig(FacesContext context,
String name,
Node dispatchContext)
Returns the wizard configuration object for the given wizard name.
|
protected String |
getWizardContainer(FacesContext context)
Retrieves the configured wizard container page
|
protected void |
handleBrowseDispatch(FacesContext context,
String fromAction,
String outcome) |
protected void |
handleDialogOpen(FacesContext context,
String fromAction,
String name)
Opens a dialog
|
protected void |
handleDialogOrWizardClose(FacesContext context,
String fromAction,
String outcome,
boolean dialog)
Closes the current dialog or wizard
|
protected void |
handleDispatch(FacesContext context,
String fromAction,
String outcome)
Processes any dispatching that may need to occur
|
void |
handleNavigation(FacesContext context,
String fromAction,
String outcome) |
protected void |
handleWizardOpen(FacesContext context,
String fromAction,
String name)
Opens a wizard
|
protected boolean |
isDialog(String outcome)
Determines whether the given outcome is dialog related
|
protected boolean |
isDialogOrWizardClosing(String outcome)
Determines whether the given outcome represents a dialog or wizard closing
|
protected boolean |
isWizard(String outcome)
Determines whether the given outcome is wizard related
|
protected boolean |
isWizardStep(String fromAction)
Determines whether the given fromAction represents a step in the wizard
i.e.
|
protected String |
stripPrefix(String outcome)
Removes the dialog or wizard prefix from the given outcome
|
public static final String OUTCOME_SEPARATOR
public static final String OUTCOME_BROWSE
public static final String DIALOG_PREFIX
public static final String WIZARD_PREFIX
public static final String CLOSE_DIALOG_OUTCOME
public static final String CLOSE_WIZARD_OUTCOME
public static final String CLOSE_MULTIPLE_START
public static final String CLOSE_MULTIPLE_END
public static final String EXTERNAL_CONTAINER_SESSION
protected String dialogContainer
protected String wizardContainer
protected String plainDialogContainer
protected String plainWizardContainer
public AlfrescoNavigationHandler(NavigationHandler origHandler)
origHandler
- The original navigation handlerpublic void handleNavigation(FacesContext context, String fromAction, String outcome)
handleNavigation
in class NavigationHandler
NavigationHandler.handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
protected boolean isDialog(String outcome)
outcome
- The outcome to testprotected boolean isWizard(String outcome)
outcome
- The outcome to testprotected boolean isDialogOrWizardClosing(String outcome)
outcome
- The outcome to testprotected int getNumberToClose(String outcome)
protected boolean isWizardStep(String fromAction)
fromAction
- The fromActionprotected String stripPrefix(String outcome)
outcome
- The outcome to remove the prefix fromprotected String getOutcomeOverride(String outcome)
outcome
- The current outcomeprotected DialogsConfigElement.DialogConfig getDialogConfig(FacesContext context, String name, Node dispatchContext)
name
- The name of dialog being launcheddispatchContext
- The node being acted uponprotected WizardsConfigElement.WizardConfig getWizardConfig(FacesContext context, String name, Node dispatchContext)
name
- The name of wizard being launcheddispatchContext
- The node being acted uponprotected String getDialogContainer(FacesContext context)
context
- FacesContextprotected String getWizardContainer(FacesContext context)
context
- FacesContextprotected Node getDispatchContextNode(FacesContext context)
protected void handleBrowseDispatch(FacesContext context, String fromAction, String outcome)
protected void handleDispatch(FacesContext context, String fromAction, String outcome)
context
- Faces contextfromAction
- The from actionoutcome
- The outcomeprotected void handleDialogOpen(FacesContext context, String fromAction, String name)
context
- FacesContextfromAction
- The fromActionname
- The name of the dialog to openprotected void handleWizardOpen(FacesContext context, String fromAction, String name)
context
- FacesContextfromAction
- The fromActionname
- The name of the wizard to openprotected void handleDialogOrWizardClose(FacesContext context, String fromAction, String outcome, boolean dialog)
context
- FacesContextfromAction
- The fromActionoutcome
- The outcomedialog
- true if a dialog is being closed, false if a wizard is being closedprotected String getViewIdFromStackObject(FacesContext context, Object topOfStack)
context
- FacesContexttopOfStack
- The object retrieved from the view stackprotected void addCurrentViewToStack(FacesContext context)
context
- FacesContextCopyright © 2005–2017 Alfresco Software. All rights reserved.