org.alfresco.web.bean.dialog
Class DialogManager

java.lang.Object
  extended by org.alfresco.web.bean.dialog.DialogManager
All Implemented Interfaces:
java.io.Serializable

public final class DialogManager
extends java.lang.Object
implements java.io.Serializable

Bean that manages the dialog framework

See Also:
Serialized Form

Field Summary
static java.lang.String BEAN_NAME
           
 
Constructor Summary
DialogManager()
           
 
Method Summary
 java.lang.String cancel()
          Method handler called when the cancel button of the dialog is pressed
 java.lang.String finish()
          Method handler called when the finish button of the dialog is pressed
 boolean getActionsAsMenu()
          Determines whether the main actions should be rendered as a menu
 java.lang.Object getActionsContext()
          Returns the object to use as the context for the main and more actions that may be configured by the dialog
 java.lang.String getActionsId()
          Returns the id of a configured action group representing the actions to display for the dialog
 java.lang.String getActionsMenuLabel()
          Returns the label to use for the main actions when a menu is being used
 java.util.List getAdditionalButtons()
          Returns a list of additional buttons to display in the dialog
 IDialogBean getBean()
          Returns the current dialog bean being managed
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
 DialogsConfigElement.DialogConfig getCurrentDialog()
          Returns the config for the current dialog
 java.lang.String getDescription()
          Returns the resolved description to use for the dialog
 java.lang.String getErrorMessage()
          Returns the error message to use in error conditions
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 java.lang.String getFinishButtonLabel()
          Returns the label to use for the finish button
 java.lang.String getIcon()
          Returns the icon to use for the current dialog
 java.lang.String getMoreActionsId()
          Returns the id of a configured action group representing the 'more actions' to display for the dialog
 java.lang.String getMoreActionsMenuLabel()
          Returns the label to use for the more actions menu
 java.lang.String getPage()
          Returns the page the dialog will use
 DialogState getState()
          Returns the state of the currently active dialog
 java.lang.String getSubTitle()
          Returns the resolved subtitle to use for the dialog
 java.lang.String getTitle()
          Returns the resolved title to use for the dialog
 boolean isFilterListVisible()
          Determines whether the current dialog should display the list of filters in the header area
 boolean isNavigationVisible()
          Determines whether the current dialog should display the next and previous buttons in the header area
 boolean isOKButtonVisible()
          Determines whether the current dialog's OK button is visible
 boolean isViewListVisible()
          Determines whether the current dialog should display the list of views in the header area
 void restoreState(DialogState state)
          Restores the dialog represented by the given DialogState object.
 void setCurrentDialog(DialogsConfigElement.DialogConfig config)
          Sets the current dialog
 void setupParameters(javax.faces.event.ActionEvent event)
          Action handler used to setup parameters for the dialog being launched
 void setupParameters(java.util.Map params)
          Sets the parameters the next dialog will initialise with
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_NAME

public static final java.lang.String BEAN_NAME
See Also:
Constant Field Values
Constructor Detail

DialogManager

public DialogManager()
Method Detail

setupParameters

public void setupParameters(java.util.Map params)
Sets the parameters the next dialog will initialise with

Parameters:
params - The parameters

setupParameters

public void setupParameters(javax.faces.event.ActionEvent event)
Action handler used to setup parameters for the dialog being launched

Parameters:
event - The event containing the parameters

setCurrentDialog

public void setCurrentDialog(DialogsConfigElement.DialogConfig config)
Sets the current dialog

Parameters:
config - The configuration for the dialog to set

getState

public DialogState getState()
Returns the state of the currently active dialog

Returns:
Current dialog's state

restoreState

public void restoreState(DialogState state)
Restores the dialog represented by the given DialogState object. NOTE: The dialog's restored() method is also called during this method.

Parameters:
state - The DialogState for the dialog to restore

getCurrentDialog

public DialogsConfigElement.DialogConfig getCurrentDialog()
Returns the config for the current dialog

Returns:
The current dialog config

getBean

public IDialogBean getBean()
Returns the current dialog bean being managed

Returns:
The current managed bean

getIcon

public java.lang.String getIcon()
Returns the icon to use for the current dialog

Returns:
The icon

getErrorMessage

public java.lang.String getErrorMessage()
Returns the error message to use in error conditions

Returns:
The error message

getTitle

public java.lang.String getTitle()
Returns the resolved title to use for the dialog

Returns:
The title

getSubTitle

public java.lang.String getSubTitle()
Returns the resolved subtitle to use for the dialog

Returns:
The subtitle

getDescription

public java.lang.String getDescription()
Returns the resolved description to use for the dialog

Returns:
The description

getPage

public java.lang.String getPage()
Returns the page the dialog will use

Returns:
The page

getActionsId

public java.lang.String getActionsId()
Returns the id of a configured action group representing the actions to display for the dialog

Returns:
The action group id

getMoreActionsId

public java.lang.String getMoreActionsId()
Returns the id of a configured action group representing the 'more actions' to display for the dialog

Returns:
The action group id

getActionsContext

public java.lang.Object getActionsContext()
Returns the object to use as the context for the main and more actions that may be configured by the dialog

Returns:
Object to use as the context for actions, the current node by default

getActionsMenuLabel

public java.lang.String getActionsMenuLabel()
Returns the label to use for the main actions when a menu is being used

Returns:
The actions menu label

getMoreActionsMenuLabel

public java.lang.String getMoreActionsMenuLabel()
Returns the label to use for the more actions menu

Returns:
The more actions menu label

getActionsAsMenu

public boolean getActionsAsMenu()
Determines whether the main actions should be rendered as a menu

Returns:
true to render the main set of actions as a menu, false to render them as a horizontal list

isOKButtonVisible

public boolean isOKButtonVisible()
Determines whether the current dialog's OK button is visible

Returns:
true if the OK button is visible, false if it's not

isNavigationVisible

public boolean isNavigationVisible()
Determines whether the current dialog should display the next and previous buttons in the header area

Returns:
true if navigation support is enabled

isViewListVisible

public boolean isViewListVisible()
Determines whether the current dialog should display the list of views in the header area

Returns:
true if change view support is enabled

isFilterListVisible

public boolean isFilterListVisible()
Determines whether the current dialog should display the list of filters in the header area

Returns:
true if filter support is enabled

getAdditionalButtons

public java.util.List getAdditionalButtons()
Returns a list of additional buttons to display in the dialog

Returns:
List of button configurations

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Returns the label to use for the cancel button

Returns:
The cancel button label

getFinishButtonLabel

public java.lang.String getFinishButtonLabel()
Returns the label to use for the finish button

Returns:
The finish button label

getFinishButtonDisabled

public boolean getFinishButtonDisabled()
Determines whether the finish button on the dialog should be disabled

Returns:
true if the button should be disabled

finish

public java.lang.String finish()
Method handler called when the finish button of the dialog is pressed

Returns:
The outcome

cancel

public java.lang.String cancel()
Method handler called when the cancel button of the dialog is pressed

Returns:
The outcome


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.