|
||||||||||
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 user interface
Constructor Summary | |
---|---|
UifFormBase()
|
Method Summary | |
---|---|
void |
addViewThatNeedsDefaultValuesApplied(String viewId)
Adds unique view id to list of views that need default values applied. |
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) |
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 |
List |
getAddedCollectionItems()
The List that 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) |
String |
getDialogExplanation()
Returns the String entered by the user when presented a dialog |
DialogManager |
getDialogManager()
Gets the DialogManager for this view/form |
String |
getDialogResponse()
Represents the option chosen by the user when interacting with a modal dialog |
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 HistoryFlow for this form which stores a trail of urls/breadcrumbs primarily used for
path-based breadcrumb display |
HistoryManager |
getHistoryManager()
The current 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) |
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 |
getLightboxScript()
Script that will run on render (view or component) for a lightbox |
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 |
Map<String,String> |
getQueryParameters()
A generic map for query parameters |
List<String> |
getReadOnlyFieldsList()
List of fields that should be read only on the view |
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 |
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 |
getState()
Gets the state. |
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 View instance. |
String |
getViewName()
Name for the View instance. |
ViewPostMetadata |
getViewPostMetadata()
Gets the ViewPostMetadata that 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 ViewService that can be used to retrieve
View instances |
List<String> |
getViewsThatNeedDefaultValuesApplied()
Unique list of view ids that need default values applied. |
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 |
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 |
isJsonRequest()
Indicates whether the request should return a JSON string |
boolean |
isRenderedInIframe()
Indicates whether the view is rendered within an iframe (this setting must be passed to the View on the url) |
boolean |
isRenderedInLightBox()
Indicates whether the view is rendered within a lightbox |
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 |
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 |
setAttachmentFile(org.springframework.web.multipart.MultipartFile attachmentFile)
Setter for the form's attachment file |
void |
setClientStateForSyncing(Map<String,Object> clientStateForSyncing)
Setter for the client state |
void |
setCollectionPagingRequest(boolean collectionPagingRequest)
|
void |
setDialogExplanation(String dialogExplanation)
Sets the dialogExplanation text value. |
void |
setDialogManager(DialogManager dialogManager)
Sets the DialogManager for this view |
void |
setDialogResponse(String dialogResponse)
Sets the response key text selected by the user as a response to a modal dialog |
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 |
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 |
setLightboxScript(String lightboxScript)
Setter for the script that generates a lightbox on render |
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 |
setQueryParameters(Map<String,String> queryParameters)
Setter for the generic query parameters |
void |
setReadOnlyFieldsList(List<String> readOnlyFieldsList)
Setter for the list of read only fields |
void |
setRenderedInIframe(boolean renderedInIframe)
|
void |
setRenderedInLightBox(boolean renderedInLightBox)
Setter for the rendered within lightbox indicator |
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 |
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 |
setState(String state)
Set the state |
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 |
setViewsThatNeedDefaultValuesApplied(List<String> viewsThatNeedDefaultValuesApplied)
Setter for the list of view ids that need default values applied. |
void |
setViewTypeName(UifConstants.ViewType viewTypeName)
Setter for the view type name |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@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 String sessionId
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
protected String state
protected List<String> viewsThatNeedDefaultValuesApplied
@RequestAccessible protected boolean renderedInLightBox
@RequestAccessible protected boolean renderedInIframe
protected String growlScript
protected String lightboxScript
protected View view
protected ViewPostMetadata viewPostMetadata
protected Map<String,String> viewRequestParameters
protected List<String> readOnlyFieldsList
protected Map<String,Object> newCollectionLines
@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 dialogExplanation
@RequestAccessible protected String dialogResponse
protected DialogManager dialogManager
protected boolean requestRedirected
@RequestAccessible protected String updateComponentId
@RequestAccessible protected Map<String,Object> extensionData
protected Map<String,String> queryParameters
Constructor Detail |
---|
public UifFormBase()
Method Detail |
---|
public void preBind(javax.servlet.http.HttpServletRequest request)
preBind
in interface ViewModel
request
- - request object containing the query parameterspublic void postBind(javax.servlet.http.HttpServletRequest request)
ViewModel
postBind
in interface ViewModel
request
- - request object containing the query parametersViewModel.postBind(javax.servlet.http.HttpServletRequest)
protected String generateFormKey()
public String getViewId()
ViewModel
View
instance. This is specified for a
view in its definition by setting the 'id' property.
getViewId
in interface ViewModel
ViewModel.getViewId()
public void setViewId(String viewId)
ViewModel
setViewId
in interface ViewModel
ViewModel.setViewId(String)
public String getViewName()
ViewModel
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)
getViewName
in interface ViewModel
ViewModel.getViewName()
public void setViewName(String viewName)
ViewModel
setViewName
in interface ViewModel
ViewModel.setViewName(String)
public UifConstants.ViewType getViewTypeName()
ViewModel
View
instances by request parameters (not necessary the
unique id)
getViewTypeName
in interface ViewModel
ViewModel.getViewTypeName()
public void setViewTypeName(UifConstants.ViewType viewTypeName)
ViewModel
setViewTypeName
in interface ViewModel
ViewModel.setViewTypeName(org.kuali.rice.krad.uif.UifConstants.ViewType)
public String getPageId()
ViewModel
getPageId
in interface ViewModel
ViewModel.getPageId()
public void setPageId(String pageId)
ViewModel
setPageId
in interface ViewModel
ViewModel.setPageId(String)
public String getFormPostUrl()
ViewModel
getFormPostUrl
in interface ViewModel
ViewModel.getFormPostUrl()
public void setFormPostUrl(String formPostUrl)
ViewModel
setFormPostUrl
in interface ViewModel
ViewModel.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 display
HistoryFlow
public void setHistoryFlow(HistoryFlow 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)
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)
flowKey
- public String getRequestUrl()
public void setRequestUrl(String requestUrl)
requestUrl
- public Map<String,String[]> getInitialRequestParameters()
public void setInitialRequestParameters(Map<String,String[]> requestParameters)
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 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
getViewRequestParameters
in interface ViewModel
org.kuali.rice.krad.uif.view.View.getViewRequestParameters()
public void setViewRequestParameters(Map<String,String> viewRequestParameters)
setViewRequestParameters
in interface ViewModel
viewRequestParameters
- 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 ViewModel
View.isSupportsRequestOverrideOfReadOnlyFields()
public void setReadOnlyFieldsList(List<String> readOnlyFieldsList)
setReadOnlyFieldsList
in interface ViewModel
public Map<String,Object> getNewCollectionLines()
ViewModel
getNewCollectionLines
in interface ViewModel
ViewModel.getNewCollectionLines()
public void setNewCollectionLines(Map<String,Object> newCollectionLines)
setNewCollectionLines
in interface ViewModel
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 ViewModel
ViewModel.getActionParameters()
public Properties getActionParametersAsProperties()
Properties
instance
public void setActionParameters(Map<String,String> actionParameters)
setActionParameters
in interface ViewModel
public String getActionParamaterValue(String actionParameterName)
actionParameterName
- - name of the action parameter to retrieve value for
public 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 request
public 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 ViewModel
ViewModel.getClientStateForSyncing()
public void setClientStateForSyncing(Map<String,Object> clientStateForSyncing)
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 ViewModel
ViewModel.getSelectedCollectionLines()
public void setSelectedCollectionLines(Map<String,Set<String>> selectedCollectionLines)
setSelectedCollectionLines
in interface ViewModel
public Set<String> getSelectedLookupResultsCache()
public void setSelectedLookupResultsCache(Set<String> selectedLookupResultsCache)
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)
formKey
- public String getRequestedFormKey()
public void setRequestedFormKey(String requestedFormKey)
requestedFormKey
- public List<String> getViewsThatNeedDefaultValuesApplied()
ViewModel
getViewsThatNeedDefaultValuesApplied
in interface ViewModel
ViewModel.getViewsThatNeedDefaultValuesApplied()
public void setViewsThatNeedDefaultValuesApplied(List<String> viewsThatNeedDefaultValuesApplied)
ViewModel
setViewsThatNeedDefaultValuesApplied
in interface ViewModel
org.kuali.rice.krad.uif.view.ViewModel#setgetViewsThatNeedDefaultValuesApplied(List)
public void addViewThatNeedsDefaultValuesApplied(String viewId)
viewid
- public boolean isRequestRedirected()
public void setRequestRedirected(boolean requestRedirected)
requestRedirected
- public org.springframework.web.multipart.MultipartFile getAttachmentFile()
public void setAttachmentFile(org.springframework.web.multipart.MultipartFile attachmentFile)
attachmentFile
- public String getUpdateComponentId()
ViewModel
getUpdateComponentId
in interface ViewModel
ViewModel.getUpdateComponentId()
public void setUpdateComponentId(String updateComponentId)
ViewModel
setUpdateComponentId
in interface ViewModel
ViewModel.setUpdateComponentId(java.lang.String)
public Component getUpdateComponent()
ViewModel
This 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 ViewModel
ViewModel.getUpdateComponent()
public void setUpdateComponent(Component updateComponent)
setUpdateComponent
in interface ViewModel
ViewModel.setUpdateComponent(org.kuali.rice.krad.uif.component.Component)
public View getView()
ViewModel
getView
in interface ViewModel
ViewModel.getView()
public void setView(View view)
ViewModel
setView
in interface ViewModel
ViewModel.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 ViewModel
public 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 ViewModel
public void setViewPostMetadata(ViewPostMetadata viewPostMetadata)
setViewPostMetadata
in interface ViewModel
getViewPostMetadata()
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 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.
dirtyForm
- public void setDirtyForm(String dirtyForm)
dirtyForm
- public boolean isRenderedInLightBox()
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 setRenderedInLightBox(boolean renderedInLightBox)
renderedInLightBox
- public boolean isRenderedInIframe()
public void setRenderedInIframe(boolean renderedInIframe)
isRenderedInIframe()
public String getGrowlScript()
ViewModel
getGrowlScript
in interface ViewModel
ViewModel.getGrowlScript()
public void setGrowlScript(String growlScript)
ViewModel
setGrowlScript
in interface ViewModel
ViewModel.setGrowlScript(String)
public String getState()
ViewModel
getState
in interface ViewModel
ViewModel.getState()
public void setState(String state)
ViewModel
setState
in interface ViewModel
ViewModel.setState(String)
public String getLightboxScript()
ViewModel
getLightboxScript
in interface ViewModel
ViewModel.getLightboxScript()
public void setLightboxScript(String lightboxScript)
ViewModel
setLightboxScript
in interface ViewModel
ViewModel.setLightboxScript(String)
public boolean isAjaxRequest()
ViewModel
Depending 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 ViewModel
ViewModel.isAjaxRequest()
public void setAjaxRequest(boolean ajaxRequest)
ViewModel
setAjaxRequest
in interface ViewModel
ViewModel.setAjaxRequest(boolean)
public String getAjaxReturnType()
ViewModel
The 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 ViewModel
ViewModel.getAjaxReturnType()
public void setAjaxReturnType(String ajaxReturnType)
ViewModel
setAjaxReturnType
in interface ViewModel
ViewModel.setAjaxReturnType(String)
public boolean isUpdateComponentRequest()
ViewModel
isUpdateComponentRequest
in interface ViewModel
ViewModel.isUpdateComponentRequest()
public boolean isUpdateDialogRequest()
ViewModel
isUpdateDialogRequest
in interface ViewModel
ViewModel.isUpdateDialogRequest()
public boolean isUpdatePageRequest()
ViewModel
isUpdatePageRequest
in interface ViewModel
ViewModel.isUpdatePageRequest()
public boolean isUpdateNoneRequest()
ViewModel
Examples of requests that do not update the view are ajax queries or requests that download a file
isUpdateNoneRequest
in interface ViewModel
ViewModel.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 ViewModel
ViewModel.isJsonRequest()
public String getRequestJsonTemplate()
ViewModel
Certain templates can be rendered to build JSON for a JSON request. The template set here (by a controller) will be rendered
getRequestJsonTemplate
in interface ViewModel
ViewModel.getRequestJsonTemplate()
public void setRequestJsonTemplate(String requestJsonTemplate)
ViewModel
setRequestJsonTemplate
in interface ViewModel
ViewModel.setRequestJsonTemplate(java.lang.String)
public boolean isCollectionPagingRequest()
isCollectionPagingRequest
in interface ViewModel
public void setCollectionPagingRequest(boolean collectionPagingRequest)
setCollectionPagingRequest
in interface ViewModel
ViewModel.isCollectionPagingRequest()
public String getDialogExplanation()
Field defined here so all forms will be able to bind to a dialog using the same property
public void setDialogExplanation(String dialogExplanation)
dialogExplanation
- - text entered by user when replying to a modal dialogpublic String getDialogResponse()
This is used to determine which option was chosen by the user. The value is the key in the key/value pair selected in the control.
public void setDialogResponse(String dialogResponse)
dialogResponse
- - the key of the option chosen by the userpublic DialogManager getDialogManager()
The DialogManager tracks modal dialog interactions with the user
public void setDialogManager(DialogManager dialogManager)
dialogManager
- - DialogManager instance for this viewpublic Map<String,Object> getExtensionData()
ViewModel
getExtensionData
in interface ViewModel
ViewModel.getExtensionData()
public void setExtensionData(Map<String,Object> extensionData)
setExtensionData
in interface ViewModel
public Map<String,String> getQueryParameters()
public void setQueryParameters(Map<String,String> queryParameters)
queryParameters
- 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)
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 items
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |