Package org.kuali.rice.krad.web.form
Class UifFormManager
java.lang.Object
org.kuali.rice.krad.web.form.UifFormManager
- All Implemented Interfaces:
Serializable
Manages Uif form objects for a session.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new form manager with an empty list of forms for the session. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionForm(UifFormBase form) Add a form to the session.protected VectorInternal vector maintained to keep track of accessed form and the order in which they were accessed.intMaximum number of forms that can be stored at one time by the manager.getSessionForm(String formKey) Retrieve a form from the session.booleanhasSessionForm(String formKey) Indicates whether the form manager has a session form with the given key.voidpurgeForm(UifFormBase form) Removes the values that are marked @SessionTransient from the form.voidremoveFormWithHistoryFormsByKey(String formKey) Removes the stored form data and the forms from the breadcrumb history from the session.voidremoveSessionForm(UifFormBase form) Removes the stored form data and the forms from the breadcrumb history from the session.voidremoveSessionFormByKey(String formKey) Removes the stored form data from the session.voidsetMaxNumberOfSessionForms(int maxNumberOfSessionForms) voidupdateFormWithSession(UifFormBase requestForm, String formKey) Retrieves the session form based on the formkey and updates the non session transient variables on the request form from the session form.
-
Field Details
-
accessedFormKeys
-
sessionForms
-
-
Constructor Details
-
UifFormManager
public UifFormManager()Create a new form manager with an empty list of forms for the session.
-
-
Method Details
-
addSessionForm
Add a form to the session.- Parameters:
form- to be added to the session
-
getSessionForm
Retrieve a form from the session.- Parameters:
formKey- of the form to retrieve from the session- Returns:
- UifFormBase
-
removeSessionForm
Removes the stored form data and the forms from the breadcrumb history from the session.- Parameters:
form- to be removed
-
removeFormWithHistoryFormsByKey
Removes the stored form data and the forms from the breadcrumb history from the session.- Parameters:
formKey- of the form to be removed
-
removeSessionFormByKey
Removes the stored form data from the session.- Parameters:
formKey- of the form to be removed
-
hasSessionForm
Indicates whether the form manager has a session form with the given key.- Parameters:
formKey- key of the form in session to check for- Returns:
- true if the manager contains the session form, false if not
-
updateFormWithSession
Retrieves the session form based on the formkey and updates the non session transient variables on the request form from the session form.- Parameters:
requestForm-formKey-
-
purgeForm
Removes the values that are marked @SessionTransient from the form.- Parameters:
form- the form from which the session transient values have been purged
-
getAccessedFormKeys
Internal vector maintained to keep track of accessed form and the order in which they were accessed.Used for the form clearing process. When forms are added to the manager their key is added to the top of the vector. When a form needs to be cleared, the form identified by the key at the botton of this vector is removed
- Returns:
- Vector instance holding form key strings
-
getMaxNumberOfSessionForms
public int getMaxNumberOfSessionForms()Maximum number of forms that can be stored at one time by the manager.- Returns:
- int max number of forms
-
setMaxNumberOfSessionForms
public void setMaxNumberOfSessionForms(int maxNumberOfSessionForms) - See Also:
-