|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.view.DialogManager
public class DialogManager
Manages the status of any modal dialogs that are used in the view.
Keeps track of which modal dialogs have been asked and/or answered during the life cycle of a view.
Constructor Summary | |
---|---|
DialogManager()
Constructs new instance |
Method Summary | |
---|---|
void |
addDialog(String dialogId,
String returnMethod)
Creates a new DialogInfo record and adds it to the list of dialogs used in the view |
String |
getCurrentDialogId()
Gets the name of the currently active dialog |
String |
getDialogAnswer(String dialogId)
Gets the answer previously entered by the user when responding to this dialog |
String |
getDialogExplanation(String dialogId)
Gets the text String value of the explanation input field |
String |
getDialogReturnMethod(String dialogId)
Retrieves the target method to redirect to when returning from a lightbox |
Map<String,org.kuali.rice.krad.uif.view.DialogManager.DialogInfo> |
getDialogs()
Gets the Map used to track dialog interactions related to the view |
boolean |
hasDialogBeenAnswered(String dialogId)
Indicates whether the named dialog has alread been answered by the user |
boolean |
hasDialogBeenDisplayed(String dialogId)
Indicates whether the named dialog has already been presented to the user |
void |
removeAllDialogs()
Removes all dialogs from the list of dialogs used in this vew. |
void |
removeDialog(String dialogId)
Removes a dialog from the list of dialogs used in this vew. |
void |
resetDialogStatus(String dialogId)
Sets the status of the dialog tracking record to indicate that this dialog has not yet been asked or answered. |
void |
setCurrentDialogId(String currentDialogId)
Sets the name of the currently active dialog |
void |
setDialogAnswer(String dialogId,
String answer)
Sets the answer chosen by the user when responding to the dialog |
void |
setDialogExplanation(String dialogId,
String explanation)
Sets the exlanation text String obtained from the explanation input field for the dialog |
void |
setDialogReturnMethod(String dialogId,
String returnMethod)
sets the return method to call after returning from dialog |
void |
setDialogs(Map<String,org.kuali.rice.krad.uif.view.DialogManager.DialogInfo> dialogs)
Sets the Map of DialogInfo records used to track modal dialog interactions within a view |
boolean |
wasDialogAnswerAffirmative(String dialogId)
Indicates whethe the user answered affirmatively to the question |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DialogManager()
Method Detail |
---|
public boolean hasDialogBeenDisplayed(String dialogId)
dialogId
- the key identifying the specific dialog
public boolean hasDialogBeenAnswered(String dialogId)
dialogId
- name of the dialog in questions
public String getDialogAnswer(String dialogId)
Returns the key value of the option chosen by the user. Returns null if the dialog has not yet been asked, or if the user has not yet responded.
dialogId
- a String identifying the dialog
public void setDialogAnswer(String dialogId, String answer)
dialogId
- id of the dialoganswer
- value chosen by the userpublic String getDialogExplanation(String dialogId)
dialogId
- dialog identifier
public void setDialogExplanation(String dialogId, String explanation)
dialogId
- identifier of the dialogexplanation
- text String from input fieldpublic boolean wasDialogAnswerAffirmative(String dialogId)
The answer string is the key used for the option key/value pair selected by the user. This assumes that the developer used one of the common keys used for yes/no questions. The answer is checked to see if it is one of the acceptable values for "Yes". If so, the method returns true. False if not. Also returns false, if the question has not even been asked of the user.
dialogId
-
public String getDialogReturnMethod(String dialogId)
dialogId
- identifies the dialog currently being handled
public void setDialogReturnMethod(String dialogId, String returnMethod)
dialogId
- returnMethod
- public void addDialog(String dialogId, String returnMethod)
New dialog entry is initialized to asked=false, answered=false. If the dialog already has a record, nothing is performed.
dialogId
- String name identifying the dialogpublic void removeDialog(String dialogId)
If the dialog is in the list, it is removed. If the dialog is not in the list, nothing is performed.
dialogId
- String identifying the dialog to be removedpublic void removeAllDialogs()
public void resetDialogStatus(String dialogId)
dialogId
- String identifier for the dialogpublic Map<String,org.kuali.rice.krad.uif.view.DialogManager.DialogInfo> getDialogs()
public void setDialogs(Map<String,org.kuali.rice.krad.uif.view.DialogManager.DialogInfo> dialogs)
dialogs
- a Map of DialogInfo records keyed by the dialog idpublic String getCurrentDialogId()
public void setCurrentDialogId(String currentDialogId)
currentDialogId
- the name of the dialog
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |