public class UifFormBase extends Object implements ViewModel
Holds properties necessary to determine the View instance that
 will be used to render the user interface
| Constructor and Description | 
|---|
| UifFormBase() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected String | generateFormKey()Creates the unique id used to store this "conversation" in the session. | 
| String | getActionEvent()Returns the action event that was sent in the action parameters (if any) | 
| Map<String,Boolean> | getActionFlags()Copy of the action flags on the view to be used by subsequent requests (so they don't need to be
 evaluated on each request). | 
| String | getActionParamaterValue(String actionParameterName)Retrieves the value for the given action parameter, or empty string if
 not found | 
| Map<String,String> | getActionParameters()Map of parameters sent for the invoked action | 
| Properties | getActionParametersAsProperties()Returns the action parameters map as a  Propertiesinstance | 
| List | getAddedCollectionItems()The  Listthat contains all newly added items for the collections on the model | 
| String | getAjaxReturnType()Gets the return type for the ajax call | 
| org.springframework.web.multipart.MultipartFile | getAttachmentFile()Holder for files that are attached through the view | 
| Map<String,Object> | getClientStateForSyncing()Map that is populated from the component state maintained on the client | 
| String | getControllerMapping()Name of the controllerMapping for this form (includes slash) | 
| Object | getDialogDataObject()The data object to bind to for a dialog | 
| Map<String,String> | getDialogExplanations()Contains values for dialog explanation fields present on the page. | 
| DialogResponse | getDialogResponse(String dialogId)Helper method to get a dialog response for the given dialog id. | 
| Map<String,DialogResponse> | getDialogResponses()Map containing dialog responses for a request 'conversation'. | 
| Map<String,Boolean> | getEditModes()Copy of the edit modes on the view to be used by subsequent requests (so they don't need to be
 evaluated on each request). | 
| Map<String,Object> | getExtensionData()A generic map for framework pieces (such as component modifiers) that need to dynamically store
 data to the form | 
| String | getFlowKey()The flowKey representing the HistoryFlow this form may be in. | 
| String | getFocusId()Field to place focus on when the page loads
 An empty focusId will result in focusing on the first visible input element by default. | 
| String | getFormKey()Key string that identifies the form instance in session storage | 
| String | getFormPostUrl()URL the form generated for the view should post to | 
| String | getGrowlScript()Script that will run on render (view or component) for generating growl messages | 
| HistoryFlow | getHistoryFlow()The current  HistoryFlowfor this form which stores a trail of urls/breadcrumbs primarily used for
 path-based breadcrumb display | 
| HistoryManager | getHistoryManager()The current  HistoryManagerthat was pulled from session which store allHistoryFlowobjects in
 the current session to keep track of the path the user has taken across views (primarily used by path-based
 breadcrumbs) | 
| Map<String,String[]> | getInitialRequestParameters()The requestParameters represent all the parameters in the query string that were initially passed to this View
 by the initial request | 
| String | getJumpToId()The jumpToId for this form, the element with this id will be jumped to automatically
 when the form is loaded in the view. | 
| String | getJumpToName()The jumpToName for this form, the element with this name will be jumped to automatically
 when the form is loaded in the view. | 
| String | getMethodToCall()Identifies the controller method that should be invoked to fulfill a
 request. | 
| Map<String,Object> | getNewCollectionLines()Holds instances for collection add lines. | 
| String | getPageId()Id for the current page being displayed within the view | 
| List<String> | getReadOnlyFieldsList()List of fields that should be read only on the view | 
| javax.servlet.http.HttpServletRequest | getRequest()Http servlet request instance for the current request being processed. | 
| String | getRequestedFormKey()This is the formKey sent on the original request. | 
| String | getRequestJsonTemplate()Template the will be invoked to return a JSON string | 
| String | getRequestUrl()The original requestUrl for the View represented by this form (url received by the controller for initial
 request) | 
| String | getReturnDialogId()Used by the dialog framework to set the dialog id for a return dialog call (when the server has
 triggered a dialog). | 
| String | getReturnDialogResponse()Used by the dialog framework to set the dialog response for a return dialog call (when the server has
 triggered a dialog). | 
| String | getReturnFormKey() | 
| String | getReturnLocation() | 
| Map<String,Set<String>> | getSelectedCollectionLines()Holds Set of String identifiers for lines that were selected in a collection from a single page. | 
| Set<String> | getSelectedLookupResultsCache()Holds Set of String identifiers for lines that were selected in a lookup collection results
 across multiple pages. | 
| String | getSessionId()Holds the id for the user's current session | 
| int | getSessionTimeoutInterval()Holds the configured session timeout interval | 
| String | getShowDialogId()For cases where the request was triggered from within a dialog, we want to show that dialog,
 identified by this id, again. | 
| String | getState()Gets the state. | 
| String | getTriggerActionId()When the request has been triggered by an action component, gives the id for the action. | 
| Component | getUpdateComponent()Component instance that been built for a refresh/disclosure request. | 
| String | getUpdateComponentId()Id for the component that should be updated for a component refresh process | 
| View | getView()View instance associated with the model. | 
| ViewHelperService | getViewHelperService()Returns an instance of the view's configured view helper service. | 
| String | getViewId()Unique Id for the  Viewinstance. | 
| String | getViewName()Name for the  Viewinstance. | 
| ViewPostMetadata | getViewPostMetadata()Gets the  ViewPostMetadatathat has been built up from processing
 of a view. | 
| Map<String,String> | getViewRequestParameters()Map of parameters that was used to configured the  View. | 
| protected ViewService | getViewService()Instance of the  ViewServicethat can be used to retrieveViewinstances | 
| UifConstants.ViewType | getViewTypeName()Name for the type of view being requested. | 
| boolean | isAddedCollectionItem(Object item)Indicates whether an collection item has been newly added | 
| boolean | isAjaxRequest()Indicates whether the request was made by an ajax call | 
| boolean | isApplyDefaultValues()Indicates whether default values should be applied. | 
| Boolean | isCanEditView()Copy of the edit view flag to be used by subsequent requests (so they don't need to be
 evaluated on each request). | 
| boolean | isCollectionPagingRequest()Indicates whether the request is for paging a collection (or sorting). | 
| boolean | isDirtyForm()True when the form is considered dirty (data has changed from original value), false otherwise | 
| boolean | isEvaluateFlagsAndModes()Determines whether edit modes and action flags should be evaluated. | 
| boolean | isJsonRequest()Indicates whether the request should return a JSON string | 
| boolean | isRenderedInDialog()Indicates whether the view is rendered within a lightbox | 
| boolean | isRenderedInIframe()Indicates whether the view is rendered within an iframe (this setting must be passed to the View on the url) | 
| boolean | isRequestRedirected()Indicates whether a redirect has been requested for the view | 
| boolean | isUpdateComponentRequest()Indicates whether the request is to update a component (only applicable for ajax requests) | 
| boolean | isUpdateDialogRequest()Indicates whether the request is to update a dialog (only applicable for ajax requests) | 
| boolean | isUpdateNoneRequest()Indicates whether the request is for a non-update of the view (only applicable for ajax requests) | 
| boolean | isUpdatePageRequest()Indicates whether the request is to update a page (only applicable for ajax requests) | 
| void | postBind(javax.servlet.http.HttpServletRequest request)Called after Spring binds the request to the form and before the controller method is invoked | 
| void | preBind(javax.servlet.http.HttpServletRequest request)Called before Spring binds the request to the form to allow for pre-processing before setting values. | 
| void | preRender(javax.servlet.http.HttpServletRequest request)Called after the controller has finished executing, but before rendering occurs. | 
| void | setActionFlags(Map<String,Boolean> actionFlags) | 
| void | setActionParameters(Map<String,String> actionParameters)Setter for the action parameters map | 
| void | setAddedCollectionItems(List addedCollectionItems)Setter for the newly added item list | 
| void | setAjaxRequest(boolean ajaxRequest)Set the ajaxRequest | 
| void | setAjaxReturnType(String ajaxReturnType)Setter for the type of ajax return | 
| void | setApplyDefaultValues(boolean applyDefaultValues)Set whether default values should be applied to the view | 
| void | setAttachmentFile(org.springframework.web.multipart.MultipartFile attachmentFile)Setter for the form's attachment file | 
| void | setCanEditView(Boolean canEditView) | 
| void | setClientStateForSyncing(Map<String,Object> clientStateForSyncing)Setter for the client state | 
| void | setCollectionPagingRequest(boolean collectionPagingRequest) | 
| void | setDialogDataObject(Object dataObject) | 
| void | setDialogExplanations(Map<String,String> dialogExplanations) | 
| void | setDialogResponses(Map<String,DialogResponse> dialogResponses) | 
| void | setDirtyForm(boolean dirtyForm)Sets the dirtyForm flag | 
| void | setDirtyForm(String dirtyForm)Set the dirtyForm flag using a String that will be converted to boolean | 
| void | setEditModes(Map<String,Boolean> editModes) | 
| void | setEvaluateFlagsAndModes(boolean evaluateFlagsAndModes) | 
| void | setExtensionData(Map<String,Object> extensionData)Setter for the generic extension data map | 
| void | setFlowKey(String flowKey)Set the flowKey | 
| void | setFocusId(String focusId) | 
| void | setFormKey(String formKey)Setter for the form's session key | 
| void | setFormPostUrl(String formPostUrl)Setter for the form post URL | 
| void | setGrowlScript(String growlScript)Setter for the script that generates growls on render | 
| void | setHistoryFlow(HistoryFlow historyFlow)Set the current HistoryFlow for this form | 
| void | setHistoryManager(HistoryManager historyManager)Set the current HistoryManager | 
| void | setInitialRequestParameters(Map<String,String[]> requestParameters)Set the requestParameters | 
| void | setJumpToId(String jumpToId) | 
| void | setJumpToName(String jumpToName) | 
| void | setMethodToCall(String methodToCall)Setter for the method to call | 
| void | setNewCollectionLines(Map<String,Object> newCollectionLines)Setter for the new collection lines Map | 
| void | setPageId(String pageId)Setter for the current page id | 
| void | setReadOnlyFieldsList(List<String> readOnlyFieldsList)Setter for the list of read only fields | 
| void | setRenderedInDialog(boolean renderedInDialog)Setter for the rendered within lightbox indicator | 
| void | setRenderedInIframe(boolean renderedInIframe) | 
| void | setRequest(javax.servlet.http.HttpServletRequest request) | 
| void | setRequestedFormKey(String requestedFormKey)Set the requestedFormKey | 
| void | setRequestJsonTemplate(String requestJsonTemplate)Setter for the template to render for the request | 
| void | setRequestRedirected(boolean requestRedirected)Setter for the request redirect indicator | 
| void | setRequestUrl(String requestUrl)Set the requestUrl | 
| void | setReturnDialogId(String returnDialogId) | 
| void | setReturnDialogResponse(String returnDialogResponse) | 
| void | setReturnFormKey(String returnFormKey) | 
| void | setReturnLocation(String returnLocation) | 
| void | setSelectedCollectionLines(Map<String,Set<String>> selectedCollectionLines)Setter for the map that holds selected collection lines | 
| void | setSelectedLookupResultsCache(Set<String> selectedLookupResultsCache)Sets the lookup result selection cache values | 
| void | setShowDialogId(String dialogId) | 
| void | setState(String state)Set the state | 
| void | setTriggerActionId(String triggerActionId) | 
| void | setUpdateComponent(Component updateComponent) | 
| void | setUpdateComponentId(String updateComponentId)Setter for the component id that should be refreshed | 
| void | setView(View view)Setter for the view instance | 
| void | setViewId(String viewId)Setter for the unique view id | 
| void | setViewName(String viewName)Setter for the view name | 
| void | setViewPostMetadata(ViewPostMetadata viewPostMetadata) | 
| void | setViewRequestParameters(Map<String,String> viewRequestParameters)Setter for the view's request parameter map | 
| void | setViewTypeName(UifConstants.ViewType viewTypeName)Setter for the view type name | 
| String | toString() | 
@RequestAccessible protected String viewId
@RequestAccessible protected String viewName
@RequestAccessible protected UifConstants.ViewType viewTypeName
@RequestAccessible protected String pageId
@RequestAccessible protected String methodToCall
@RequestAccessible protected String formKey
@RequestAccessible protected String requestedFormKey
@RequestAccessible protected String flowKey
protected int sessionTimeoutInterval
protected HistoryFlow historyFlow
protected HistoryManager historyManager
@RequestAccessible protected String jumpToId
protected String jumpToName
@RequestAccessible protected String focusId
@RequestAccessible protected boolean dirtyForm
protected String formPostUrl
protected String controllerMapping
@RequestAccessible protected boolean renderedInDialog
@RequestAccessible protected boolean renderedInIframe
protected String growlScript
protected ViewPostMetadata viewPostMetadata
protected Map<String,String> viewRequestParameters
protected List<String> readOnlyFieldsList
protected Map<String,Object> newCollectionLines
@RequestAccessible protected String triggerActionId
@RequestAccessible protected Map<String,String> actionParameters
protected Map<String,Object> clientStateForSyncing
protected Map<String,Set<String>> selectedCollectionLines
protected Set<String> selectedLookupResultsCache
protected List<Object> addedCollectionItems
protected org.springframework.web.multipart.MultipartFile attachmentFile
@RequestAccessible protected String returnLocation
@RequestAccessible protected String returnFormKey
@RequestAccessible protected boolean ajaxRequest
@RequestAccessible protected String ajaxReturnType
@RequestAccessible protected String showDialogId
@RequestAccessible protected String returnDialogId
@RequestAccessible protected String returnDialogResponse
@RequestAccessible protected Map<String,String> dialogExplanations
protected Map<String,DialogResponse> dialogResponses
protected boolean requestRedirected
@RequestAccessible protected String updateComponentId
@RequestAccessible protected Map<String,Object> extensionData
protected boolean applyDefaultValues
protected boolean evaluateFlagsAndModes
protected Boolean canEditView
protected Map<String,Boolean> actionFlags
protected javax.servlet.http.HttpServletRequest request
public UifFormBase()
public void preBind(javax.servlet.http.HttpServletRequest request)
public void postBind(javax.servlet.http.HttpServletRequest request)
public void preRender(javax.servlet.http.HttpServletRequest request)
protected String generateFormKey()
public String getViewId()
ViewModelView instance. This is specified for a
 view in its definition by setting the 'id' property.getViewId in interface ViewModelViewModel.getViewId()public void setViewId(String viewId)
ViewModelsetViewId in interface ViewModelViewModel.setViewId(String)public String getViewName()
ViewModelView instance. This is specified for a view in
 its definition by setting the 'id' property. The name is not necessary
 unique and cannot be used by itself to retrieve a view. Typically it is
 used with other parameters to identify a view with a certain type (view
 type)getViewName in interface ViewModelViewModel.getViewName()public void setViewName(String viewName)
ViewModelsetViewName in interface ViewModelViewModel.setViewName(String)public UifConstants.ViewType getViewTypeName()
ViewModelView instances by request parameters (not necessary the
 unique id)getViewTypeName in interface ViewModelViewModel.getViewTypeName()public void setViewTypeName(UifConstants.ViewType viewTypeName)
ViewModelsetViewTypeName in interface ViewModelViewModel.setViewTypeName(org.kuali.rice.krad.uif.UifConstants.ViewType)public String getPageId()
ViewModelgetPageId in interface ViewModelViewModel.getPageId()public void setPageId(String pageId)
ViewModelsetPageId in interface ViewModelViewModel.setPageId(String)public String getFormPostUrl()
ViewModelgetFormPostUrl in interface ViewModelViewModel.getFormPostUrl()public void setFormPostUrl(String formPostUrl)
ViewModelsetFormPostUrl in interface ViewModelViewModel.setFormPostUrl(String)public String getControllerMapping()
public HistoryFlow getHistoryFlow()
HistoryFlow for this form which stores a trail of urls/breadcrumbs primarily used for
 path-based breadcrumb displayHistoryFlowpublic void setHistoryFlow(HistoryFlow historyFlow)
public HistoryManager getHistoryManager()
HistoryManager that was pulled from session which store all HistoryFlow objects in
 the current session to keep track of the path the user has taken across views (primarily used by path-based
 breadcrumbs)public void setHistoryManager(HistoryManager historyManager)
public String getFlowKey()
This allows for a flow to continue by key or start (if set to "start"). If null or blank, no flow (or path based breadcrumbs) are being tracked.
public void setFlowKey(String flowKey)
public String getRequestUrl()
public void setRequestUrl(String requestUrl)
public Map<String,String[]> getInitialRequestParameters()
public void setInitialRequestParameters(Map<String,String[]> requestParameters)
public String getReturnLocation()
public void setReturnLocation(String returnLocation)
public String getReturnFormKey()
public void setReturnFormKey(String returnFormKey)
public String getSessionId()
 The user's session id is used to track when a timeout has occurred and enforce the policy
 configured with the ViewSessionPolicy. This property gets initialized
 in the postBind(javax.servlet.http.HttpServletRequest) method and then is written out as a
 hidden on the view. Therefore each post done on the view will send back the session id when the view was
 rendering, and the UifSessionTimeoutFilter can use that to determine
 if a timeout has occurred
 
public int getSessionTimeoutInterval()
 Holds the session timeout interval so it can be referenced to give the user notifications (for example the
 session timeout warning reads this property). This is initialized from the session object in
 postBind(javax.servlet.http.HttpServletRequest)
 
public String getMethodToCall()
RequestMapping annotation for the controller methodpublic void setMethodToCall(String methodToCall)
public Map<String,String> getViewRequestParameters()
View.
 Maintained on the form to rebuild the view on posts and session timeoutgetViewRequestParameters in interface ViewModelorg.kuali.rice.krad.uif.view.View.getViewRequestParameters()public void setViewRequestParameters(Map<String,String> viewRequestParameters)
setViewRequestParameters in interface ViewModelviewRequestParameters - map of request parameterspublic List<String> getReadOnlyFieldsList()
If the view being rendered supports request setting of read-only fields, the readOnlyFields request parameter can be sent to mark fields as read only that might not have been otherwise
Note the paths specified should be the simple property names (not the full binding path). Therefore if the property name appears multiple times in the view, all instances will be set as read only
getReadOnlyFieldsList in interface ViewModelView.isSupportsRequestOverrideOfReadOnlyFields()public void setReadOnlyFieldsList(List<String> readOnlyFieldsList)
setReadOnlyFieldsList in interface ViewModelpublic Map<String,Object> getNewCollectionLines()
ViewModelgetNewCollectionLines in interface ViewModelViewModel.getNewCollectionLines()public void setNewCollectionLines(Map<String,Object> newCollectionLines)
setNewCollectionLines in interface ViewModelpublic String getTriggerActionId()
getTriggerActionId in interface ViewModelpublic void setTriggerActionId(String triggerActionId)
setTriggerActionId in interface ViewModelViewModel.getTriggerActionId()public Map<String,String> getActionParameters()
ViewModel
 Many times besides just setting the method to call actions need to send
 additional parameters. For instance the method being called might do a
 redirect, in which case the action needs to send parameters for the
 redirect URL. An example of this is redirecting to a Lookup
 view. In some cases the parameters that need to be sent conflict with
 properties already on the form, and putting all the action parameters as
 form properties would grow massive (in addition to adds an additional
 step from the XML config). So this general map solves those issues.
 
getActionParameters in interface ViewModelViewModel.getActionParameters()public Properties getActionParametersAsProperties()
Properties instancepublic void setActionParameters(Map<String,String> actionParameters)
setActionParameters in interface ViewModelpublic String getActionParamaterValue(String actionParameterName)
actionParameterName - - name of the action parameter to retrieve value forpublic String getActionEvent()
The action event is a special action parameter that can be sent to indicate a type of action being taken. This can be looked at by the view or components to render differently
TODO: make sure action parameters are getting reinitialized on each requestpublic Map<String,Object> getClientStateForSyncing()
ViewModel
 Used when a request is made that refreshes part of the view. The current state for components (which
 have state that can be changed on the client), is populated into this map which is then used by the
 ViewHelperService to update the components so that the state is maintained when they render.
 
getClientStateForSyncing in interface ViewModelViewModel.getClientStateForSyncing()public void setClientStateForSyncing(Map<String,Object> clientStateForSyncing)
public Map<String,Set<String>> getSelectedCollectionLines()
ViewModel
 When the select field is enabled for a CollectionGroup, the framework will be
 default bind the selected identifier strings to this property. The key of the map uniquely identifies the
 collection by the full binding path to the collection, and the value is a set of Strings for the checked
 lines.
 
getSelectedCollectionLines in interface ViewModelViewModel.getSelectedCollectionLines()public void setSelectedCollectionLines(Map<String,Set<String>> selectedCollectionLines)
setSelectedCollectionLines in interface ViewModelpublic Set<String> getSelectedLookupResultsCache()
public void setSelectedLookupResultsCache(Set<String> selectedLookupResultsCache)
public String getFormKey()
When the view is posted, the previous form instance is retrieved and then populated from the request parameters. This key string is retrieve the session form from the session service
public void setFormKey(String formKey)
public String getRequestedFormKey()
public void setRequestedFormKey(String requestedFormKey)
public boolean isRequestRedirected()
public void setRequestRedirected(boolean requestRedirected)
public org.springframework.web.multipart.MultipartFile getAttachmentFile()
public void setAttachmentFile(org.springframework.web.multipart.MultipartFile attachmentFile)
public String getUpdateComponentId()
ViewModelgetUpdateComponentId in interface ViewModelViewModel.getUpdateComponentId()public void setUpdateComponentId(String updateComponentId)
ViewModelsetUpdateComponentId in interface ViewModelViewModel.setUpdateComponentId(java.lang.String)public Component getUpdateComponent()
ViewModelThis is generally set by org.kuali.rice.krad.uif.lifecycle.ViewLifecycle#performComponentLifecycle(org.kuali.rice.krad.uif.view.View, java.lang.Object, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.kuali.rice.krad.uif.lifecycle.ViewPostMetadata, java.lang.String) after processing the lifecycle. The form property provides access to the rendering layer.
getUpdateComponent in interface ViewModelViewModel.getUpdateComponent()public void setUpdateComponent(Component updateComponent)
setUpdateComponent in interface ViewModelViewModel.setUpdateComponent(org.kuali.rice.krad.uif.component.Component)public View getView()
ViewModelgetView in interface ViewModelViewModel.getView()public void setView(View view)
ViewModelsetView in interface ViewModelViewModel.setView(org.kuali.rice.krad.uif.view.View)public ViewHelperService getViewHelperService()
First checks if there is an initialized view containing a view helper instance. If not, and there is a view id on the form, a call is made to retrieve the view helper instance or class configuration.
Returns the view helper service instance that was configured for the current view.getViewHelperService in interface ViewModelpublic ViewPostMetadata getViewPostMetadata()
ViewPostMetadata that has been built up from processing
 of a view.
 The view post metadata is used to read information about the view that was rendered when a post occurs. For example, you might need to check whether a particular flag was enabled for the rendered view when processing the post logic
getViewPostMetadata in interface ViewModelpublic void setViewPostMetadata(ViewPostMetadata viewPostMetadata)
setViewPostMetadata in interface ViewModelgetViewPostMetadata()protected ViewService getViewService()
ViewService that can be used to retrieve
 View instancespublic String getJumpToId()
public void setJumpToId(String jumpToId)
jumpToId - the jumpToId to setpublic String getJumpToName()
public void setJumpToName(String jumpToName)
jumpToName - the jumpToName to setpublic String getFocusId()
public void setFocusId(String focusId)
focusId - the focusId to setpublic boolean isDirtyForm()
For most scenarios, this flag should NOT be set to true. If this is set, it must be managed explicitly by the application. This flag exists for marking a form dirty from a server call, so it must be changed to false when the form is no longer considered dirty. The krad save Action and navigate methodToCall resets this flag back to false, but any other setting of this flag must be managed by custom configuration/methods, if custom dirtyForm management is needed.
public void setDirtyForm(boolean dirtyForm)
For most scenarios, this flag should NOT be set to true. If this is set, it must be managed explicitly by the application. This flag exists for marking a form dirty from a server call, so it must be changed to false when the form is no longer considered dirty. The krad save Action and navigate methodToCall resets this flag back to false, but any other setting of this flag must be managed by custom configuration/methods, if custom dirtyForm management is needed.
public void setDirtyForm(String dirtyForm)
public boolean isRenderedInDialog()
Some discussion (for example how a close button behaves) need to change based on whether the view is rendered within a lightbox or the standard browser window. This boolean is true when it is within a lightbox
public void setRenderedInDialog(boolean renderedInDialog)
public boolean isRenderedInIframe()
public void setRenderedInIframe(boolean renderedInIframe)
isRenderedInIframe()public boolean isApplyDefaultValues()
ViewModelDefault field values of a view need to be applied after the view life cycle completes. Otherwise, they risk getting over written.
isApplyDefaultValues in interface ViewModelViewModel.isApplyDefaultValues()public void setApplyDefaultValues(boolean applyDefaultValues)
ViewModelsetApplyDefaultValues in interface ViewModelViewModel.setApplyDefaultValues(boolean)public boolean isEvaluateFlagsAndModes()
ViewModelInitially this will be true causing edit modes and action flags to be evaluated on the initial request to a view. If these need to be reevaluated at some point (for a particular view instance), this flag can be set to true and causing the authorization to be reevaluated during the lifecycle.
isEvaluateFlagsAndModes in interface ViewModelViewModel.isEvaluateFlagsAndModes()public void setEvaluateFlagsAndModes(boolean evaluateFlagsAndModes)
setEvaluateFlagsAndModes in interface ViewModelViewModel.setEvaluateFlagsAndModes(boolean)public Boolean isCanEditView()
ViewModelIf null, edit check will be performed
isCanEditView in interface ViewModelViewModel.isCanEditView()public void setCanEditView(Boolean canEditView)
setCanEditView in interface ViewModelViewModel.setCanEditView(Boolean)public Map<String,Boolean> getActionFlags()
ViewModelgetActionFlags in interface ViewModelViewModel.getActionFlags()public void setActionFlags(Map<String,Boolean> actionFlags)
setActionFlags in interface ViewModelorg.kuali.rice.krad.uif.view.ViewModel#setActionFlags(java.util.Map) public Map<String,Boolean> getEditModes()
ViewModelgetEditModes in interface ViewModelViewModel.getEditModes()public void setEditModes(Map<String,Boolean> editModes)
setEditModes in interface ViewModelorg.kuali.rice.krad.uif.view.ViewModel#setEditModes(java.util.Map) public String getGrowlScript()
ViewModelgetGrowlScript in interface ViewModelViewModel.getGrowlScript()public void setGrowlScript(String growlScript)
ViewModelsetGrowlScript in interface ViewModelViewModel.setGrowlScript(String)public String getState()
ViewModelgetState in interface ViewModelViewModel.getState()public void setState(String state)
ViewModelsetState in interface ViewModelViewModel.setState(String)public boolean isAjaxRequest()
ViewModelDepending on whether the request was made via ajax (versus standard browser submit) the response will be handled different. For example with an ajax request we can send back partial page updates, which cannot be done with standard submits
 If this indicator is true, ViewModel.getAjaxReturnType() will be used to determine how to handling
 the ajax return
 
isAjaxRequest in interface ViewModelViewModel.isAjaxRequest()public void setAjaxRequest(boolean ajaxRequest)
ViewModelsetAjaxRequest in interface ViewModelViewModel.setAjaxRequest(boolean)public String getAjaxReturnType()
ViewModelThe ajax return type indicates how the response content will be handled in the client. Typical examples include updating a component, the page, or doing a redirect.
getAjaxReturnType in interface ViewModelViewModel.getAjaxReturnType()public void setAjaxReturnType(String ajaxReturnType)
ViewModelsetAjaxReturnType in interface ViewModelViewModel.setAjaxReturnType(String)public boolean isUpdateComponentRequest()
ViewModelisUpdateComponentRequest in interface ViewModelViewModel.isUpdateComponentRequest()public boolean isUpdateDialogRequest()
ViewModelisUpdateDialogRequest in interface ViewModelViewModel.isUpdateDialogRequest()public boolean isUpdatePageRequest()
ViewModelisUpdatePageRequest in interface ViewModelViewModel.isUpdatePageRequest()public boolean isUpdateNoneRequest()
ViewModelExamples of requests that do not update the view are ajax queries or requests that download a file
isUpdateNoneRequest in interface ViewModelViewModel.isUpdateNoneRequest()public boolean isJsonRequest()
ViewModel
 When this indicator is true, the rendering process will invoke the template
 given by ViewModel.getRequestJsonTemplate() which should return a JSON string
 
 For JSON requests the view is not built, however a component can be retrieved and
 exported in the request by setting ViewModel.getUpdateComponentId()
 
isJsonRequest in interface ViewModelViewModel.isJsonRequest()public String getRequestJsonTemplate()
ViewModelCertain templates can be rendered to build JSON for a JSON request. The template set here (by a controller) will be rendered
getRequestJsonTemplate in interface ViewModelViewModel.getRequestJsonTemplate()public void setRequestJsonTemplate(String requestJsonTemplate)
ViewModelsetRequestJsonTemplate in interface ViewModelViewModel.setRequestJsonTemplate(java.lang.String)public boolean isCollectionPagingRequest()
isCollectionPagingRequest in interface ViewModelpublic void setCollectionPagingRequest(boolean collectionPagingRequest)
setCollectionPagingRequest in interface ViewModelViewModel.isCollectionPagingRequest()public String getShowDialogId()
public void setShowDialogId(String dialogId)
getShowDialogId()public String getReturnDialogId()
Note this is a request only property. On a return call the value for this gets pulled and used to
 create an entry in getDialogResponses()
public void setReturnDialogId(String returnDialogId)
getReturnDialogId()public String getReturnDialogResponse()
Note this is a request only property. On a return call the value for this gets pulled and used to
 create an entry in getDialogResponses()
public void setReturnDialogResponse(String returnDialogResponse)
getReturnDialogResponse()public Map<String,String> getDialogExplanations()
Since multiple dialogs can be present on the same page using the generic explanation field, the values are maintained in this map using the dialog id as the key. Values are cleared on each request.
getDialogExplanations in interface ViewModelpublic void setDialogExplanations(Map<String,String> dialogExplanations)
setDialogExplanations in interface ViewModelViewModel.getDialogExplanations()public Map<String,DialogResponse> getDialogResponses()
When a controller methods requests a dialog, the response is collected on the return call and placed into this map. The key to the map is the id for the dialog. Since a single controller method can spawn multiple dialogs in a single conversation (these are actually multiple requests/responses, but part of the same action request), the responses are collected in this map. Whenever a request is encountered that is not a return, the map is cleared. This means the responses will be cleared in case the action is triggered action.
getDialogResponses in interface ViewModelpublic DialogResponse getDialogResponse(String dialogId)
getDialogResponse in interface ViewModeldialogId - id of the dialog to get response forViewModel.getDialogResponses()public void setDialogResponses(Map<String,DialogResponse> dialogResponses)
setDialogResponses in interface ViewModelViewModel.getDialogResponses()public Map<String,Object> getExtensionData()
ViewModelgetExtensionData in interface ViewModelViewModel.getExtensionData()public void setExtensionData(Map<String,Object> extensionData)
setExtensionData in interface ViewModelpublic javax.servlet.http.HttpServletRequest getRequest()
public void setRequest(javax.servlet.http.HttpServletRequest request)
getRequest()public List getAddedCollectionItems()
List that contains all newly added items for the collections on the model
 This list contains the new items for all the collections on the model.
public void setAddedCollectionItems(List addedCollectionItems)
public boolean isAddedCollectionItem(Object item)
Tests collection items against the list of newly added items on the model. This list gets cleared when the view is submitted and the items are persisted.
item - - the item to test against list of newly added itemspublic Object getDialogDataObject()
The data object serves as a placeholder for temporary properties that might be used within a dialog. The purpose of placeholder is to provide a separation between the dialog object and the underlying object for use in cases like object manipulation.
public void setDialogDataObject(Object dataObject)
getDialogDataObject()Copyright © 2005–2016 The Kuali Foundation. All rights reserved.