|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.DictionaryBeanBase org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase org.kuali.rice.krad.uif.component.ComponentBase org.kuali.rice.krad.uif.container.ContainerBase org.kuali.rice.krad.uif.container.Group org.kuali.rice.krad.uif.container.DialogGroup
public class DialogGroup
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
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.
Field Summary |
---|
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase |
---|
templateOptions |
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
---|
componentCode, namespaceCode |
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 | ||
---|---|---|
protected
|
copyProperties(T component)
Copies properties for copy() |
|
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(Object model,
Component parent)
The following actions are performed in this phase: |
|
void |
performFinalize(Object model,
Component parent)
The following actions are performed in this phase: |
|
void |
performInitialization(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 |
Methods inherited from class org.kuali.rice.krad.uif.container.Group |
---|
completeValidation, getComponentsForLifecycle, getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, isRenderLoading, 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, initializePendingTasks, setDefaultItemPosition, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItems |
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 |
---|
dataDictionaryPostProcessing, 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.datadictionary.uif.UifDictionaryBean |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
---|
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode |
Methods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement |
---|
checkMutable, copy, getId, isMutable, setId |
Constructor Detail |
---|
public DialogGroup()
Method Detail |
---|
public void performInitialization(Object model)
performInitialization
in interface LifecycleElement
performInitialization
in class Group
model
- - object instance containing the view dataorg.kuali.rice.krad.uif.component.ComponentBase#performInitialization(org.kuali.rice.krad.uif.view.View,
java.lang.Object)
public void performApplyModel(Object model, Component parent)
performApplyModel
in interface LifecycleElement
performApplyModel
in class ContainerBase
model
- - Top level object containing the data (could be the form or a
top level business object, dto)org.kuali.rice.krad.uif.component.ComponentBase#performApplyModel(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
public void performFinalize(Object model, Component parent)
performFinalize
in interface LifecycleElement
performFinalize
in class ContainerBase
view
- view instance that should be finalized for renderingmodel
- top level object containing the dataparent
- parent componentorg.kuali.rice.krad.uif.component.ComponentBase#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)
DictionaryBeanBase
copyProperties
in class Group
component
- base beanDictionaryBeanBase.copyProperties(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |