public interface ModelAndViewService
ModelAndView
instances
and also other controller helper methods such as showing a dialog, a message view, or redirecting.Modifier and Type | Method and Description |
---|---|
org.springframework.web.servlet.ModelAndView |
checkForm(UifFormBase form)
Handles the check form action to validate the given form data.
|
org.springframework.web.servlet.ModelAndView |
getMessageView(UifFormBase form,
String headerText,
String messageText)
Builds a message view from the given header and message text then forwards the UIF model and view.
|
org.springframework.web.servlet.ModelAndView |
getModelAndView(UifFormBase form)
Configures the Spring model and view instance containing the form data and pointing to the
generic Uif view.
|
org.springframework.web.servlet.ModelAndView |
getModelAndView(UifFormBase form,
Map<String,Object> additionalViewAttributes)
Configures the Spring model and view instance containing the form data and pointing to the
generic Uif view, and also adds the given attributes (which can be referenced in the view templates).
|
org.springframework.web.servlet.ModelAndView |
getModelAndView(UifFormBase form,
String pageId)
Configures the Spring model and view instance containing the form data and pointing to the
generic Uif view, and also changes the current page to the given page id.
|
org.springframework.web.servlet.ModelAndView |
getModelAndViewWithInit(UifFormBase form,
String viewId)
Initialize a new view instance for the given view id, then configures the Spring model and view
instance containing the form data and pointing to the generic Uif view.
|
org.springframework.web.servlet.ModelAndView |
getModelAndViewWithInit(UifFormBase form,
String viewId,
String pageId)
Initialize a new view instance for the given view id, then configures the Spring model and view
instance containing the form data and pointing to the generic Uif view.
|
org.springframework.web.servlet.ModelAndView |
performRedirect(UifFormBase form,
String redirectUrl)
Builds a model and view instance configured to redirect to the given URL.
|
org.springframework.web.servlet.ModelAndView |
performRedirect(UifFormBase form,
String baseUrl,
Properties urlParameters)
Builds an URL from the given base URL and parameters, then builds a model and view instance
configured to redirect to the built URL.
|
void |
prepareView(javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.ModelAndView modelAndView)
After the controller logic is executed, the form is placed into session and the corresponding view
is prepared for rendering.
|
org.springframework.web.servlet.ModelAndView |
showDialog(String dialogId,
boolean confirmation,
UifFormBase form)
Invoked by controller methods to show a dialog to the user.
|
org.springframework.web.servlet.ModelAndView checkForm(UifFormBase form)
form
- instance containing the model dataorg.springframework.web.servlet.ModelAndView showDialog(String dialogId, boolean confirmation, UifFormBase form)
This will return back to the view and display the dialog to the user. When the users chooses a response,
the initial action that triggered the controller method (which called showDialog) will be triggered again. The
response will be captured in the form property
UifFormBase.getDialogResponses()
. In the case of a confirmation, if 'false'
(typically labeled cancel) is choosen the initial action will simply not be triggered again.
dialogId
- id for the dialog group to showconfirmation
- whether the dialog should be shown as a confirmation, in this case it is expected the
options are true (continue) or false (stop). In addition, if the user selects the false option, the dialog
answer will not be resubmitted to the server, instead the user will remain on the viewform
- instance containing the model dataorg.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form, String baseUrl, Properties urlParameters)
form
- form instance containing the model databaseUrl
- base URL to redirect tourlParameters
- parameters to add to the base URLorg.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form, String redirectUrl)
form
- instance containing the model dataredirectUrl
- URL to redirect toorg.springframework.web.servlet.ModelAndView getMessageView(UifFormBase form, String headerText, String messageText)
If an error or other type of interruption occurs during the request processing the controller can invoke this message to display the message to the user. This will abandon the view that was requested and display a view with just the message
form
- instance containing the model dataheaderText
- header text for the message view (can be blank)messageText
- text for the message to displayorg.springframework.web.servlet.ModelAndView getModelAndView(UifFormBase form)
The view and page to render is assumed to be set in the given form object.
form
- form instance containing the model dataorg.springframework.web.servlet.ModelAndView getModelAndView(UifFormBase form, String pageId)
The view to render is assumed to be set in the given form object.
form
- form instance containing the model datapageId
- page id within the view to renderorg.springframework.web.servlet.ModelAndView getModelAndView(UifFormBase form, Map<String,Object> additionalViewAttributes)
The view and page to render is assumed to be set in the given form object.
form
- form instance containing the model dataadditionalViewAttributes
- additional attributes to add to the returned model and vieworg.springframework.web.servlet.ModelAndView getModelAndViewWithInit(UifFormBase form, String viewId)
This can be used by controllers to render a different view from the one initially requested (if any)
form
- form instance containing the model dataviewId
- id for the view to initializeorg.springframework.web.servlet.ModelAndView getModelAndViewWithInit(UifFormBase form, String viewId, String pageId)
This can be used by controllers to render a different view from the one initially requested (if any)
form
- form instance containing the model dataviewId
- id for the view to initializepageId
- page id within the view to rendervoid prepareView(javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.ModelAndView modelAndView)
request
- servlet requestmodelAndView
- model and viewCopyright © 2005–2016 The Kuali Foundation. All rights reserved.