|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.web.form.UifFormBase
public class UifFormBase
Base form class for views within the KRAD User Interface Framework
Holds properties necessary to determine the View
instance that
will be used to render the UI
Field Summary | |
---|---|
protected Map<String,String> |
actionParameters
|
protected org.springframework.web.multipart.MultipartFile |
attachmentFile
|
protected Map<String,Object> |
clientStateForSyncing
|
protected boolean |
defaultsApplied
|
protected String |
focusId
|
protected History |
formHistory
|
protected String |
formKey
|
protected String |
formPostUrl
|
protected String |
jumpToId
|
protected String |
jumpToName
|
protected String |
methodToCall
|
protected Map<String,Object> |
newCollectionLines
|
protected String |
pageId
|
protected View |
previousView
|
protected boolean |
renderFullView
|
protected String |
returnFormKey
|
protected String |
returnLocation
|
protected Map<String,Set<String>> |
selectedCollectionLines
|
protected boolean |
validateDirty
|
protected View |
view
|
protected String |
viewId
|
protected String |
viewName
|
protected Map<String,String> |
viewRequestParameters
|
protected String |
viewTypeName
|
Constructor Summary | |
---|---|
UifFormBase()
|
Method Summary | |
---|---|
protected String |
generateFormKey()
Creates the unique id used to store this "conversation" in the session. |
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 Properties instance |
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 |
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. |
History |
getFormHistory()
History parameter representing the History of views that have come before the viewing of the current view |
String |
getFormKey()
Key string that identifies the form instance in session storage |
String |
getFormPostUrl()
|
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 |
View |
getPreviousView()
View instance for the page that made a request. |
String |
getReturnFormKey()
|
String |
getReturnLocation()
|
Map<String,Set<String>> |
getSelectedCollectionLines()
Holds Set of String identifiers for lines that were selected in a collection |
View |
getView()
View instance associated with the form. |
String |
getViewId()
Unique Id for the View instance. |
String |
getViewName()
Name for the View instance. |
Map<String,String> |
getViewRequestParameters()
Map of parameters that was used to configured the View . |
protected ViewService |
getViewService()
Instance of the ViewService that can be used to retrieve
View instances |
String |
getViewTypeName()
Name for the type of view being requested. |
boolean |
isDefaultsApplied()
Indicates whether the form has had default values from the configured View applied. |
boolean |
isRenderFullView()
|
boolean |
isValidateDirty()
Indicates whether the form should be validated for dirtyness |
void |
postBind(javax.servlet.http.HttpServletRequest request)
Called after Spring binds the request to the form and before the controller method is invoked. |
void |
setActionParameters(Map<String,String> actionParameters)
Setter for the action parameters map |
void |
setAttachmentFile(org.springframework.web.multipart.MultipartFile attachmentFile)
Setter for the form's attachment file |
void |
setDefaultsApplied(boolean defaultsApplied)
Setter for the defaults applied indicator |
void |
setFocusId(String focusId)
|
void |
setFormHistory(History history)
Setter for the current History object |
void |
setFormKey(String formKey)
Setter for the form's session key |
void |
setFormPostUrl(String formPostUrl)
|
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 |
setPreviousView(View previousView)
Setter for the previous view instance |
void |
setRenderFullView(boolean renderFullView)
|
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 |
setValidateDirty(boolean validateDirty)
Setter for dirty validation indicator |
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 |
setViewRequestParameters(Map<String,String> viewRequestParameters)
Setter for the view's request parameter map |
void |
setViewTypeName(String viewTypeName)
Setter for the view type name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String viewId
protected String viewName
protected String viewTypeName
protected String pageId
protected String methodToCall
protected String formKey
protected String jumpToId
protected String jumpToName
protected String focusId
protected String formPostUrl
protected boolean defaultsApplied
protected View view
protected View previousView
protected Map<String,String> viewRequestParameters
protected Map<String,Object> newCollectionLines
protected Map<String,String> actionParameters
protected Map<String,Object> clientStateForSyncing
protected Map<String,Set<String>> selectedCollectionLines
protected org.springframework.web.multipart.MultipartFile attachmentFile
protected String returnLocation
protected String returnFormKey
protected History formHistory
protected boolean renderFullView
protected boolean validateDirty
Constructor Detail |
---|
public UifFormBase()
Method Detail |
---|
protected String generateFormKey()
public void postBind(javax.servlet.http.HttpServletRequest request)
request
- - request object containing the query parameterspublic String getViewId()
View
instance. This is specified for a
view in its definition by setting the 'id' property.
public void setViewId(String viewId)
viewId
- public String getViewName()
View
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)
public void setViewName(String viewName)
viewName
- public String getViewTypeName()
View
instances by request parameters (not necessary the
unique id)
public void setViewTypeName(String viewTypeName)
viewTypeName
- public String getPageId()
public void setPageId(String pageId)
pageId
- public String getFormPostUrl()
public void setFormPostUrl(String formPostUrl)
public String getReturnLocation()
public void setReturnLocation(String returnLocation)
public String getReturnFormKey()
public void setReturnFormKey(String returnFormKey)
public String getMethodToCall()
RequestMapping
annotation for the controller method
public void setMethodToCall(String methodToCall)
methodToCall
- public Map<String,String> getViewRequestParameters()
View
.
Maintained on the form to rebuild the view on posts and session timeout
org.kuali.rice.krad.uif.view.View.getViewRequestParameters()
public void setViewRequestParameters(Map<String,String> viewRequestParameters)
viewRequestParameters
- public Map<String,Object> getNewCollectionLines()
public void setNewCollectionLines(Map<String,Object> newCollectionLines)
newCollectionLines
- public Map<String,String> getActionParameters()
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.
public Properties getActionParametersAsProperties()
Properties
instance
public void setActionParameters(Map<String,String> actionParameters)
actionParameters
- public String getActionParamaterValue(String actionParameterName)
actionParameterName
- - name of the action parameter to retrieve value for
public Map<String,Object> getClientStateForSyncing()
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.
public Map<String,Set<String>> getSelectedCollectionLines()
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.
DataObjectMetaDataService.getDataObjectIdentifierString(java.lang.Object)
public void setSelectedCollectionLines(Map<String,Set<String>> selectedCollectionLines)
selectedCollectionLines
- 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)
formKey
- public boolean isDefaultsApplied()
View
applied. This happens only once for each form instance
public void setDefaultsApplied(boolean defaultsApplied)
defaultsApplied
- public org.springframework.web.multipart.MultipartFile getAttachmentFile()
public void setAttachmentFile(org.springframework.web.multipart.MultipartFile attachmentFile)
attachmentFile
- public boolean isRenderFullView()
public void setRenderFullView(boolean renderFullView)
renderFullView
- public View getView()
public void setView(View view)
view
- public View getPreviousView()
public void setPreviousView(View previousView)
previousView
- protected ViewService getViewService()
ViewService
that can be used to retrieve
View
instances
public 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 History getFormHistory()
Used for breadcrumb widget generation on the view and also for navigating back to previous or hub locations
public void setFormHistory(History history)
history
- the history to setpublic boolean isValidateDirty()
For FormView, it's necessary to validate when the user tries to navigate out of the form. If set, all the AttributeFields will be validated on refresh, navigate, cancel or close Action or on form unload and if dirty, displays a message and user can decide whether to continue with the action or stay on the form
public void setValidateDirty(boolean validateDirty)
validateDirty
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |