org.kuali.rice.krad.uif.container
Class DialogGroup

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.component.ComponentBase
              extended by org.kuali.rice.krad.uif.container.ContainerBase
                  extended by org.kuali.rice.krad.uif.container.Group
                      extended by org.kuali.rice.krad.uif.container.DialogGroup
All Implemented Interfaces:
Serializable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, Container, Helpable, org.springframework.core.Ordered

public class DialogGroup
extends Group

Special type of Group that presents a the content for a modal dialog

This type of group will be hidden when the main view is displayed. It will be used as content inside the LightBox widget when the modal dialog is displayed. For convenience, this group contains a standard set of components for commonly used modal dialogs

The DialogGroup may also serve as a base class for more complex dialogs. The default settings for this DialogGroup is to display a prompt message with two buttons labeled OK and Cancel. The optional explanation TextAreaControl is hidden by default.

The prompt text, number of user options and their corresponding label are configurable. The InputField for the explanation is TextAreaControl by default. It may be configured to other types of InputFields. The Component for ResponseInputField is a HorizontalCheckboxGroup by default. JQuery styling is then used to style the checkboxes as buttons. The ResponseInputField may be configured to other InputField types.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
DialogGroup()
           
 
Method Summary
 List<KeyValue> getAvailableResponses()
          Gets the choices provided for user response.
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 InputField getExplanation()
          Retrieves the explanation InputField used to gather user input text from the dialog
 MessageField getPrompt()
          Retrieves the Message element for this dialog
 String getPromptText()
          Returns the text to be displayed as the prompt or main message in this simple dialog
 InputField getResponseInputField()
          Retrieves the InputField containing the choices displayed in this dialog
 boolean isDisplayExplanation()
          determines if the explanation InputField is to be displayed in this dialog
 boolean isReverseButtonOrder()
          Determines the positioning order of the choices displayed on this dialog
 boolean isUseAjaxCallForContent()
          indicates which approach is used to fill the lightbox content for this dialog.
 void performFinalize(View view, Object model, Component parent)
          Performs the final phase of the component lifecycle.
 void performInitialization(View view, Object model)
          The following actions are performed: Move custom dialogGroup properties prompt, explanation, and responseInputField into items collection
 void setAvailableResponses(List<KeyValue> availableResponses)
          Sets the list of user responses to provide on this dialog
 void setDisplayExplanation(boolean displayExplanation)
          Sets whether to display the Explanation InputField on this dialog
 void setExplanation(InputField explanation)
          Sets the InputField for gathering user text input
 void setPrompt(MessageField prompt)
          Sets the prompt Message for this dialog
 void setPromptText(String promptText)
          Sets the text String to display as the main message in this dialog
 void setResponseInputField(InputField responseInputField)
          Sets the type of InputField used to display the user choices in this dialog
 void setReverseButtonOrder(boolean reverseButtonOrder)
          Sets the display order of the choices displayed on this dialog
 void setUseAjaxCallForContent(boolean useAjaxCallForContent)
          Sets whether the content for the dialog will be filled via ajax call or hidden group
 
Methods inherited from class org.kuali.rice.krad.uif.container.Group
completeValidation, getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, setDisclosure, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems, setScrollpane
 
Methods inherited from class org.kuali.rice.krad.uif.container.ContainerBase
getComponentPrototypes, getDefaultItemPosition, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, performApplyModel, setDefaultItemPosition, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addDataAttribute, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAllDataAttributesJs, getBaseId, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, isDisableSessionPersistence, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setBaseId, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setForceSessionPersistence, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnLoadScript
 

Constructor Detail

DialogGroup

public DialogGroup()
Method Detail

getComponentsForLifecycle

public List<Component> getComponentsForLifecycle()
Description copied from interface: Component
List of components that are contained within the component and should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Specified by:
getComponentsForLifecycle in interface Component
Overrides:
getComponentsForLifecycle in class Group
Returns:
List child components
See Also:
ComponentBase.getComponentsForLifecycle()

performInitialization

public void performInitialization(View view,
                                  Object model)
The following actions are performed:

Specified by:
performInitialization in interface Component
Overrides:
performInitialization in class Group
Parameters:
view - - view instance in which the component belongs
model - - object instance containing the view data
See Also:
ComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)

performFinalize

public void performFinalize(View view,
                            Object model,
                            Component parent)
Performs the final phase of the component lifecycle.

For this DialogGroup component, perform the following:

Specified by:
performFinalize in interface Component
Overrides:
performFinalize in class ContainerBase
Parameters:
view - - view instance that should be finalized for rendering
model - - top level object containing the data
parent - - parent component
See Also:
ComponentBase.performFinalize(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

getPromptText

public String getPromptText()
Returns the text to be displayed as the prompt or main message in this simple dialog

Returns:
String containing the prompt text

setPromptText

public void setPromptText(String promptText)
Sets the text String to display as the main message in this dialog

Parameters:
promptText - - the String to be displayed as the main message

getPrompt

public MessageField getPrompt()
Retrieves the Message element for this dialog

Returns:
Message - the text element containing the message string

setPrompt

public void setPrompt(MessageField prompt)
Sets the prompt Message for this dialog

Parameters:
prompt - - The Message element for this dialog

getExplanation

public InputField getExplanation()
Retrieves the explanation InputField used to gather user input text from the dialog

By default, the control for this input is configured as a TextAreaControl. It may be configured for other types of input fields.

Returns:
InputField component

setExplanation

public void setExplanation(InputField explanation)
Sets the InputField for gathering user text input

Parameters:
explanation - - InputField

isDisplayExplanation

public boolean isDisplayExplanation()
determines if the explanation InputField is to be displayed in this dialog

False by default.

Returns:
boolean - true if this user input is to be rendered, false if not.

setDisplayExplanation

public void setDisplayExplanation(boolean displayExplanation)
Sets whether to display the Explanation InputField on this dialog

Parameters:
displayExplanation - - true if explanation control is to be displayed, false if not

getAvailableResponses

public List<KeyValue> getAvailableResponses()
Gets the choices provided for user response.

A List of KeyValue pairs for each of the choices provided on this dialog.

Returns:
the List of response actions to provide the user.

setAvailableResponses

public void setAvailableResponses(List<KeyValue> availableResponses)
Sets the list of user responses to provide on this dialog

Parameters:
availableResponses - - a List of KeyValue pairs representing the user response choices

getResponseInputField

public InputField getResponseInputField()
Retrieves the InputField containing the choices displayed in this dialog

By default, this InputField is configured to be a HorizontalCheckboxControl. Styling is then used to make the checkboxes appear to be buttons. The values of the availableResponses List are used as labels for the "buttons".

Returns:
InputField component within this dialog

setResponseInputField

public void setResponseInputField(InputField responseInputField)
Sets the type of InputField used to display the user choices in this dialog

Parameters:
responseInputField - - A component used to display the response choices

isReverseButtonOrder

public boolean isReverseButtonOrder()
Determines the positioning order of the choices displayed on this dialog

Some page designers like the positive choice on the left and the negative choice on the right. Others, prefer just the opposite. This allows the order to easily be switched.

Returns:
- true if choices left to right false if choices right to left

setReverseButtonOrder

public void setReverseButtonOrder(boolean reverseButtonOrder)
Sets the display order of the choices displayed on this dialog

By default, the choices are displayed left to right

Parameters:
reverseButtonOrder - - true if buttons displayed left to right, false if right to left

isUseAjaxCallForContent

public boolean isUseAjaxCallForContent()
indicates which approach is used to fill the lightbox content for this dialog.

Two techniques are used for filling the content of the lightbox when displaying this dialog.

The default approach is to use a hidden form.

Returns:

setUseAjaxCallForContent

public void setUseAjaxCallForContent(boolean useAjaxCallForContent)
Sets whether the content for the dialog will be filled via ajax call or hidden group

Parameters:
useAjaxCallForContent - - boolean set to true if ajax call is used to get content, false if hidden group is used for content.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.