public class DialogGroup extends GroupBase
A dialog group can be used for many different purposes. First it can be used to give a simple confirmation (
a prompt with ok/cancel or yes/no options). The Action component contains
properties for adding a confirmation dialog. Next, a dialog can be used to prompt for a response or to gather
addition data on the client. In this situation, the dialog is configured either in the view or external to the view,
and the developers triggers the display of the dialog using the javascript method showDialog. See krad.modal.js
for more information. Dialogs can also be triggered from a controller method (or other piece of server code). Again
the dialog is configured with the view or external to the view, and the controller method triggers the show using
the method UifControllerBase.showDialog(java.lang.String, boolean, org.kuali.rice.krad.web.form.UifFormBase).
A dialog is a group and can be configured like any other general group. For building basic dialogs, there are convenience properties that can be used. In addition, there are base beans provided with definitions for these properties. This includes a basic prompt message and responses. Note to have responses with different action properties, set the items of the dialog groups footer directly.
GroupBase.ACTION_VALIDATION_COMPONENTStemplateOptionscomponentCode, namespaceCodeINITIAL_ORDER_VALUE| Constructor and Description |
|---|
DialogGroup()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<KeyValue> |
getAvailableResponses()
List of options that are available for the user to choice as a response to the dialog.
|
String |
getDialogCssClass()
Gets CSS class to use when rendering dialog (default is modal-sm).
|
InputField |
getExplanation()
Input field use to gather explanation text with the dialog.
|
String |
getOnDialogResponseScript()
Script that will be invoked when the dialog response event is thrown.
|
String |
getOnHiddenDialogScript()
Script that will get invoked once the dialog group is hidden.
|
String |
getOnHideDialogScript()
Script that will get invoked when the dialog group receives a hide event.
|
String |
getOnShowDialogScript()
Script that will get invoked when the dialog group is shown.
|
MessageField |
getPrompt()
Message component to use for the dialog prompt.
|
String |
getPromptText()
Text to be displayed as the prompt or main message in this simple dialog.
|
boolean |
isDestroyDialogOnHidden()
Flag to indicate whether the contents of the dialog should be destroyed on hidden.
|
void |
performApplyModel(Object model,
LifecycleElement parent)
The following actions are performed in this phase:
For each configured key value response, create an action component and add to the footer items.
The following updates are done here:
Evaluate the progressive render condition (if set) and combine with the current render
status to set the render status
Called after the initialize phase to perform conditional logic based on the model data
|
void |
performFinalize(Object model,
LifecycleElement parent)
The following actions are performed in this phase:
Add data attributes for any configured event handlers
Sets the section boolean to true if this group has a rendering header with text
The following finalization is performed:
Sets the headerText of the header Group if it is blank
Set the messageText of the summary Message if it is blank
Finalizes LayoutManager
The following finalization is done here:
progressiveRender and conditionalRefresh variables are processed if set
If any of the style properties were given, sets the style string on the style property
Set the skipInTabOrder flag for nested components
The last phase before the view is rendered
|
void |
performInitialization(Object model)
The following actions are performed in this phase:
If property name nor binding path is set on the explanation field, sets to generic form property
Move custom dialogGroup properties prompt and explanation into items collection if the
items list is not already populated
The following initialization is performed:
Sorts the containers list of components
Initializes the instructional field if necessary
Initializes LayoutManager
The following updates are done here:
Invoke performInitialize on component modifiers
Initializes the component
|
void |
setAvailableResponses(List<KeyValue> availableResponses) |
void |
setDestroyDialogOnHidden(boolean destroyDialogOnHidden) |
void |
setDialogCssClass(String dialogCssClass) |
void |
setExplanation(InputField explanation) |
void |
setOnDialogResponseScript(String onDialogResponseScript) |
void |
setOnHiddenDialogScript(String onHiddenDialogScript) |
void |
setOnHideDialogScript(String onHideDialogScript) |
void |
setOnShowDialogScript(String onShowDialogScript) |
void |
setPrompt(MessageField prompt) |
void |
setPromptText(String promptText) |
afterEvaluateExpression, buildInputFieldValidationActionScript, completeValidation, getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, getWrapperTag, isAjaxDisclosureGroup, isRenderLoading, setDisclosure, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems, setNestedComponentId, setScrollpane, setupValidationScripts, setWrapperTag, validateInputFieldgetAdditionalTemplates, getDefaultItemPosition, getEnterKeyAction, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, setDefaultItemPosition, setEnterKeyAction, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItemsaddAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecyclegetExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionscopy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeaderText, setHeaderText, setRenderFootergetEnterKeyAction, getFooter, getHeader, getInstructionalMessage, getLayoutManager, getValidationMessages, isProcessRemoteFieldHolders, setEnterKeyAction, setFooter, setHeader, setInstructionalMessage, setLayoutManager, setValidationMessages, sortItemsaddAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStylegetExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsdataDictionaryPostProcessing, getComponentCode, getNamespaceCodecheckMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecyclegetOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScriptgetHelp, getHelpTitle, setHelp, setTooltipOfComponentpublic DialogGroup()
public void performInitialization(Object model)
Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
performInitialization in interface LifecycleElementperformInitialization in class GroupBasemodel - - object instance containing the view dataComponentDefaultInitializeTaskpublic void performApplyModel(Object model, LifecycleElement parent)
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel in interface LifecycleElementperformApplyModel in class ContainerBasemodel - - Top level object containing the data (could be the form or a
top level business object, dto)parent - parent lifecycle elementpublic void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize in interface LifecycleElementperformFinalize in class GroupBasemodel - - top level object containing the dataparent - - parent componentpublic String getPromptText()
This is a convenience method for setting the message text on getPrompt()
public void setPromptText(String promptText)
getPromptText()@ViewLifecycleRestriction public MessageField getPrompt()
public void setPrompt(MessageField prompt)
getPrompt()@ViewLifecycleRestriction public 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)
getExplanation()public List<KeyValue> getAvailableResponses()
If given, the list of key value pairs is used to create action components that are inserted into the dialog footer. The key will be used as the response value, and the value as the label for the action.
Note responses can be also be created by populating the footer items with action components.
public void setAvailableResponses(List<KeyValue> availableResponses)
getAvailableResponses()public String getDialogCssClass()
public void setDialogCssClass(String dialogCssClass)
public String getOnDialogResponseScript()
The dialog group will throw a custom event type 'dialogresponse.uif' when an response action within the dialog is selected. Script given here will bind to that event as a handler
The event object contains: event.response - response value for the action that was selected event.action - jQuery object for the action element that was selected event.dialogId - id for the dialog the response applies to
public void setOnDialogResponseScript(String onDialogResponseScript)
getOnDialogResponseScript()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, a show event will be thrown and this script will be executed
public void setOnShowDialogScript(String onShowDialogScript)
getOnShowDialogScript()public String getOnHideDialogScript()
public void setOnHideDialogScript(String onHideDialogScript)
getOnHideDialogScript()public String getOnHiddenDialogScript()
public void setOnHiddenDialogScript(String onHiddenDialogScript)
getOnHiddenDialogScript()public boolean isDestroyDialogOnHidden()
public void setDestroyDialogOnHidden(boolean destroyDialogOnHidden)
isDestroyDialogOnHidden()Copyright © 2005–2018 The Kuali Foundation. All rights reserved.