public class DialogGroup extends Group
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
InputField
for holding the user's textual response
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.
INITIAL_ORDER_VALUE
Constructor and Description |
---|
DialogGroup() |
Modifier and Type | Method and Description |
---|---|
protected <T> void |
copyProperties(T component)
Copies the properties over for the copy method
|
List<KeyValue> |
getAvailableResponses()
Gets the choices provided for user response.
|
String |
getEventHandlerScript()
Override to add the handler script for the dialog response and show dialog events
|
InputField |
getExplanation()
Retrieves the explanation InputField used to gather user input text from the dialog
|
String |
getOnDialogResponseScript()
Script that will be invoked when the response event is thrown
|
String |
getOnShowDialogScript()
Script that will get invoked when the dialog group is shown
|
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
|
void |
performApplyModel(View view,
Object model,
Component parent)
The following actions are performed in this phase:
|
void |
performFinalize(View view,
Object model,
Component parent)
The following actions are performed in this phase:
|
void |
performInitialization(View view,
Object model)
The following actions are performed in this phase:
Move custom dialogGroup properties prompt, explanation, and responseInputField into items collection if they
are not already present
|
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 |
setOnDialogResponseScript(String onDialogResponseScript)
Setter for the 'dialogresponse.uif' event handler code
|
void |
setOnShowDialogScript(String onShowDialogScript)
Setter for the 'showdialog.uif' event handler code
|
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
|
completeValidation, getComponentsForLifecycle, getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, isRenderLoading, setDisclosure, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems, setScrollpane
getComponentPrototypes, getDefaultItemPosition, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, setDefaultItemPosition, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItems
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
getComponentCode, getNamespaceCode
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
public DialogGroup()
public void performInitialization(View view, Object model)
performInitialization
in interface Component
performInitialization
in class Group
view
- - view instance in which the component belongsmodel
- - object instance containing the view dataComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View,
java.lang.Object)
public void performApplyModel(View view, Object model, Component parent)
performApplyModel
in interface Component
performApplyModel
in class ContainerBase
view
- - view instance to which the component belongsmodel
- - Top level object containing the data (could be the form or a
top level business object, dto)ComponentBase.performApplyModel(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
public void performFinalize(View view, Object model, Component parent)
performFinalize
in interface Component
performFinalize
in class ContainerBase
view
- view instance that should be finalized for renderingmodel
- top level object containing the dataparent
- parent componentComponentBase.performFinalize(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
public String getEventHandlerScript()
getEventHandlerScript
in interface Component
getEventHandlerScript
in class ComponentBase
Component.getEventHandlerScript()
public String getPromptText()
public void setPromptText(String promptText)
promptText
- the String to be displayed as the main messagepublic MessageField getPrompt()
public void setPrompt(MessageField prompt)
prompt
- The Message element for this dialogpublic InputField getExplanation()
By default, the control for this input is configured as a TextAreaControl. It may be configured for other types of input fields.
public void setExplanation(InputField explanation)
explanation
- InputFieldpublic boolean isDisplayExplanation()
False by default.
public void setDisplayExplanation(boolean displayExplanation)
displayExplanation
- true if explanation control is to be displayed, false if notpublic List<KeyValue> getAvailableResponses()
A List of KeyValue pairs for each of the choices provided on this dialog.
public void setAvailableResponses(List<KeyValue> availableResponses)
availableResponses
- a List of KeyValue pairs representing the user response choicespublic InputField getResponseInputField()
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".
public void setResponseInputField(InputField responseInputField)
responseInputField
- a component used to display the response choicespublic boolean isReverseButtonOrder()
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.
public void setReverseButtonOrder(boolean reverseButtonOrder)
By default, the choices are displayed left to right
reverseButtonOrder
- true if buttons displayed left to right, false if right to leftpublic String getOnDialogResponseScript()
The dialog group will throw a custom event type 'dialogresponse.uif' when a change occurs for the response input field (for example one of the response options is selected). Script given here will bind to that event as a handler
public void setOnDialogResponseScript(String onDialogResponseScript)
onDialogResponseScript
- public String getOnShowDialogScript()
Initially a dialog group will either be hidden in the DOM or not present at all (if retrieved via Ajax). When the dialog is triggered and shown, the 'showdialog.uif' event will be thrown and this script will be executed
public void setOnShowDialogScript(String onShowDialogScript)
onShowDialogScript
- protected <T> void copyProperties(T component)
ComponentBase
copyProperties
in class Group
component
- base beanComponentBase.copy()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.