org.kuali.rice.krad.web.controller
Class UifControllerBase

java.lang.Object
  extended by org.kuali.rice.krad.web.controller.UifControllerBase
Direct Known Subclasses:
ActionListController, CacheAdminController, ConfigurationTestViewUifController, CourseOfferingController, DataAttributesTestUifController, DialogTestViewUifController, DocumentControllerBase, DummyLoginController, EncryptionController, IncidentReportController, InitiatedDocumentInfoController, InquiryController, KradLabsController, KradSampleAppController, LookupController, ModuleLockedController, RegistrationController, ServerPagingTestController, SessionTimeoutController, StatsController, TrainingApplicationController, TransactionController, UifClientListener, UifComponentsTestController, UifComponentsTestController, UifGuestController, UILayoutTestController, UITestController, XmlIngesterController

public abstract class UifControllerBase
extends Object

Base controller class for views within the KRAD User Interface Framework Provides common methods such as:

All subclass controller methods after processing should call one of the #getUIFModelAndView methods to setup the View and return the ModelAndView instance.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
UifControllerBase()
           
 
Method Summary
 org.springframework.web.servlet.ModelAndView addBlankLine(UifFormBase uifForm)
          Called by the add blank line action for a new collection line
 org.springframework.web.servlet.ModelAndView addLine(UifFormBase uifForm, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called by the add line action for a new collection line.
 org.springframework.web.servlet.ModelAndView back(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Attempts to go back by looking at various return mechanisms in HistoryFlow and on the form.
 org.springframework.web.servlet.ModelAndView cancel(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Just returns as if return with no value was selected.
 org.springframework.web.servlet.ModelAndView checkForm(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Checks the form/view against all current and future validations and returns warnings for any validations that fail
 void checkViewAuthorization(UifFormBase form, String methodToCall)
          Invokes the configured ViewAuthorizer to verify the user has access to open the view.
protected  DataTablesPagingHelper createDataTablesPagingHelperInstance(UifFormBase form, javax.servlet.http.HttpServletRequest request)
          Creates a DataTablesPagingHelper which is used within tableJsonRetrieval(org.kuali.rice.krad.web.form.UifFormBase, org.springframework.validation.BindingResult, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) for rendering pages of data in JSON form.
protected abstract  UifFormBase createInitialForm(javax.servlet.http.HttpServletRequest request)
          Called to create a new model(form) object when necessary.
 org.springframework.web.servlet.ModelAndView defaultMapping(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Default method mapping for cases where the method to call is not passed, calls the start method
 org.springframework.web.servlet.ModelAndView deleteLine(UifFormBase uifForm, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called by the delete line action for a model collection.
protected  boolean getBooleanDialogResponse(String dialogId, UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles modal dialog interactions for a view controller When a controller method wishes to prompt the user for additional information before continuing to process the request.
protected  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
protected  String getStringDialogResponse(String dialogId, UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles a modal dialog interaction with the client user when a String response is desired
protected  org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form)
          Configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view
protected  org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form, Map<String,Object> additionalViewAttributes)
          Configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view, additional attributes may be exposed to the view through the map argument
protected  org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form, String pageId)
          Configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view
protected  org.springframework.web.servlet.ModelAndView getUIFModelAndViewWithInit(UifFormBase form, String viewId)
          Retrieves a new view instance for the given view id and then configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view
protected  ViewService getViewService()
           
protected  boolean hasDialogBeenAnswered(String dialogId, UifFormBase form)
          returns whether the dialog has already been answered by the user
protected  boolean hasDialogBeenDisplayed(String dialogId, UifFormBase form)
          returns whether this dialog has been displayed on the client
 UifFormBase initForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create/obtain the model(form) object before it is passed to the Binder/BeanWrapper.
 org.springframework.web.servlet.ModelAndView navigate(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles menu navigation between view pages
 AttributeQueryResult performFieldQuery(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Invoked to execute the AttributeQuery associated with a field given the query parameters found in the request.
 AttributeQueryResult performFieldSuggest(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Invoked to provide the options for a suggest widget.
 org.springframework.web.servlet.ModelAndView performLookup(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Builds up a URL to the lookup view based on the given post action parameters and redirects
protected  org.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form, String redirectUrl)
          Builds a ModelAndView instance configured to redirect to the given URL
protected  org.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form, String baseUrl, Properties urlParameters)
          Builds a ModelAndView instance configured to redirect to the URL formed by joining the base URL with the given URL parameters
 org.springframework.web.servlet.ModelAndView refresh(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          handles an ajax refresh
 org.springframework.web.servlet.ModelAndView retrieveCollectionPage(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieve a page defined by the page number parameter for a collection
 org.springframework.web.servlet.ModelAndView retrieveOriginalComponent(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieves the original component as it exists in postedView without attempting to refresh it; fast and consistent when this is all that is needed
 org.springframework.web.servlet.ModelAndView returnFromLightbox(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Common return point for dialogs
 org.springframework.web.servlet.ModelAndView returnToHistory(UifFormBase form, boolean homeFlag)
          Invoked to navigate back to a history entry.
 org.springframework.web.servlet.ModelAndView returnToHub(UifFormBase form)
          Invoked to navigate back to the first page in history.
 org.springframework.web.servlet.ModelAndView returnToPrevious(UifFormBase form)
          Invoked to navigate back one page in history..
 org.springframework.web.servlet.ModelAndView saveLine(UifFormBase uifForm, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called by the save line action for a new collection line.
 org.springframework.web.servlet.ModelAndView sessionTimeout(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Invoked when a session timeout occurs, default impl does nothing but render the view
protected  org.springframework.web.servlet.ModelAndView showDialog(String dialogId, UifFormBase form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Complete the response directly and launch lightbox with dialog content upon returning back to the client.
 org.springframework.web.servlet.ModelAndView start(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Initial method called when requesting a new view instance which checks authorization and forwards the view for rendering
 String tableCsvRetrieval(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates exportable table data as CSV based on the rich table selected
 org.springframework.web.servlet.ModelAndView tableJsonRetrieval(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Get method for getting aaData for jquery datatables which are using sAjaxSource option.
 String tableXlsRetrieval(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates exportable table data in xsl based on the rich table selected
 String tableXmlRetrieval(UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Generates exportable table data based on the rich table selected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UifControllerBase

public UifControllerBase()
Method Detail

initForm

@ModelAttribute(value="KualiForm")
public UifFormBase initForm(javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
Create/obtain the model(form) object before it is passed to the Binder/BeanWrapper. This method is not intended to be overridden by client applications as it handles framework setup and session maintenance. Clients should override createInitialForm() instead when they need custom form initialization.

Parameters:
request - the http request that was made
response - the http response object

createInitialForm

protected abstract UifFormBase createInitialForm(javax.servlet.http.HttpServletRequest request)
Called to create a new model(form) object when necessary. This usually occurs on the initial request in a conversation (when the model is not present in the session). This method must be overridden when extending a controller and using a different form type than the superclass.

Parameters:
request - - the http request that was made

defaultMapping

@RequestMapping
public org.springframework.web.servlet.ModelAndView defaultMapping(@ModelAttribute(value="KualiForm")
                                                                                  UifFormBase form,
                                                                                  org.springframework.validation.BindingResult result,
                                                                                  javax.servlet.http.HttpServletRequest request,
                                                                                  javax.servlet.http.HttpServletResponse response)
Default method mapping for cases where the method to call is not passed, calls the start method


start

@RequestMapping(params="methodToCall=start")
public org.springframework.web.servlet.ModelAndView start(@ModelAttribute(value="KualiForm")
                                                                         UifFormBase form,
                                                                         org.springframework.validation.BindingResult result,
                                                                         javax.servlet.http.HttpServletRequest request,
                                                                         javax.servlet.http.HttpServletResponse response)
Initial method called when requesting a new view instance which checks authorization and forwards the view for rendering


checkViewAuthorization

public void checkViewAuthorization(UifFormBase form,
                                   String methodToCall)
                            throws AuthorizationException
Invokes the configured ViewAuthorizer to verify the user has access to open the view. An exception is thrown if access has not been granted

Note this method is invoked automatically by the controller interceptor for each request

Parameters:
form - - form instance containing the request data
methodToCall - - the request parameter 'methodToCall' which is used to determine the controller method invoked
Throws:
AuthorizationException

sessionTimeout

@RequestMapping(params="methodToCall=sessionTimeout")
public org.springframework.web.servlet.ModelAndView sessionTimeout(@ModelAttribute(value="KualiForm")
                                                                                  UifFormBase form,
                                                                                  org.springframework.validation.BindingResult result,
                                                                                  javax.servlet.http.HttpServletRequest request,
                                                                                  javax.servlet.http.HttpServletResponse response)
Invoked when a session timeout occurs, default impl does nothing but render the view


addLine

@RequestMapping(method=POST,
                params="methodToCall=addLine")
public org.springframework.web.servlet.ModelAndView addLine(@ModelAttribute(value="KualiForm")
                                                                           UifFormBase uifForm,
                                                                           org.springframework.validation.BindingResult result,
                                                                           javax.servlet.http.HttpServletRequest request,
                                                                           javax.servlet.http.HttpServletResponse response)
Called by the add line action for a new collection line. Method determines which collection the add action was selected for and invokes the view helper service to add the line


addBlankLine

@RequestMapping(method=POST,
                params="methodToCall=addBlankLine")
public org.springframework.web.servlet.ModelAndView addBlankLine(@ModelAttribute(value="KualiForm")
                                                                                UifFormBase uifForm)
Called by the add blank line action for a new collection line

Method determines which collection the add action was selected for and invokes the view helper service to add the blank line.

Parameters:
uifForm - - form instance containing the request data
Returns:
the ModelAndView object

saveLine

@RequestMapping(method=POST,
                params="methodToCall=saveLine")
public org.springframework.web.servlet.ModelAndView saveLine(@ModelAttribute(value="KualiForm")
                                                                            UifFormBase uifForm,
                                                                            org.springframework.validation.BindingResult result,
                                                                            javax.servlet.http.HttpServletRequest request,
                                                                            javax.servlet.http.HttpServletResponse response)
Called by the save line action for a new collection line. Does server side validation and provides hook for client application to persist specific data.


deleteLine

@RequestMapping(method=POST,
                params="methodToCall=deleteLine")
public org.springframework.web.servlet.ModelAndView deleteLine(@ModelAttribute(value="KualiForm")
                                                                              UifFormBase uifForm,
                                                                              org.springframework.validation.BindingResult result,
                                                                              javax.servlet.http.HttpServletRequest request,
                                                                              javax.servlet.http.HttpServletResponse response)
Called by the delete line action for a model collection. Method determines which collection the action was selected for and the line index that should be removed, then invokes the view helper service to process the action


cancel

@RequestMapping(params="methodToCall=cancel")
public org.springframework.web.servlet.ModelAndView cancel(@ModelAttribute(value="KualiForm")
                                                                          UifFormBase form,
                                                                          org.springframework.validation.BindingResult result,
                                                                          javax.servlet.http.HttpServletRequest request,
                                                                          javax.servlet.http.HttpServletResponse response)
Just returns as if return with no value was selected.


back

@RequestMapping(params="methodToCall=back")
public org.springframework.web.servlet.ModelAndView back(@ModelAttribute(value="KualiForm")
                                                                        UifFormBase form,
                                                                        org.springframework.validation.BindingResult result,
                                                                        javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response)
Attempts to go back by looking at various return mechanisms in HistoryFlow and on the form. If a back cannot be determined, returns to the application url.


returnToPrevious

@RequestMapping(params="methodToCall=returnToPrevious")
public org.springframework.web.servlet.ModelAndView returnToPrevious(@ModelAttribute(value="KualiForm")
                                                                                    UifFormBase form)
Invoked to navigate back one page in history..

Parameters:
form - - form object that should contain the history object

returnToHub

@RequestMapping(params="methodToCall=returnToHub")
public org.springframework.web.servlet.ModelAndView returnToHub(@ModelAttribute(value="KualiForm")
                                                                               UifFormBase form)
Invoked to navigate back to the first page in history.

Parameters:
form - - form object that should contain the history object

returnToHistory

public org.springframework.web.servlet.ModelAndView returnToHistory(UifFormBase form,
                                                                    boolean homeFlag)
Invoked to navigate back to a history entry. The homeFlag will determine whether navigation will be back to the first or last history entry.

Parameters:
form - - form object that should contain the history object
homeFlag - - if true will navigate back to first entry else will navigate to last entry in the history

navigate

@RequestMapping(method=POST,
                params="methodToCall=navigate")
public org.springframework.web.servlet.ModelAndView navigate(@ModelAttribute(value="KualiForm")
                                                                            UifFormBase form,
                                                                            org.springframework.validation.BindingResult result,
                                                                            javax.servlet.http.HttpServletRequest request,
                                                                            javax.servlet.http.HttpServletResponse response)
Handles menu navigation between view pages


refresh

@RequestMapping(params="methodToCall=refresh")
public org.springframework.web.servlet.ModelAndView refresh(@ModelAttribute(value="KualiForm")
                                                                           UifFormBase form,
                                                                           org.springframework.validation.BindingResult result,
                                                                           javax.servlet.http.HttpServletRequest request,
                                                                           javax.servlet.http.HttpServletResponse response)
                                                     throws Exception
handles an ajax refresh

The query form plugin activates this request via a form post, where on the JS side, org.kuali.rice.krad.uif.UifParameters#RENDER_FULL_VIEW is set to false

Parameters:
form - - Holds properties necessary to determine the View instance that will be used to render the UI
result - - represents binding results
request - - http servlet request data
response - - http servlet response object
Returns:
the ModelAndView object
Throws:
Exception

performLookup

@RequestMapping(method=POST,
                params="methodToCall=performLookup")
public org.springframework.web.servlet.ModelAndView performLookup(@ModelAttribute(value="KualiForm")
                                                                                 UifFormBase form,
                                                                                 org.springframework.validation.BindingResult result,
                                                                                 javax.servlet.http.HttpServletRequest request,
                                                                                 javax.servlet.http.HttpServletResponse response)
Builds up a URL to the lookup view based on the given post action parameters and redirects


checkForm

@RequestMapping(method=POST,
                params="methodToCall=checkForm")
public org.springframework.web.servlet.ModelAndView checkForm(@ModelAttribute(value="KualiForm")
                                                                             UifFormBase form,
                                                                             org.springframework.validation.BindingResult result,
                                                                             javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
Checks the form/view against all current and future validations and returns warnings for any validations that fail


performFieldSuggest

@RequestMapping(method=GET,
                params="methodToCall=performFieldSuggest")
@ResponseBody
public AttributeQueryResult performFieldSuggest(@ModelAttribute(value="KualiForm")
                                                                            UifFormBase form,
                                                                            org.springframework.validation.BindingResult result,
                                                                            javax.servlet.http.HttpServletRequest request,
                                                                            javax.servlet.http.HttpServletResponse response)
Invoked to provide the options for a suggest widget. The valid options are retrieved by the associated AttributeQuery for the field containing the suggest widget. The controller method picks out the query parameters from the request and calls AttributeQueryService to perform the suggest query and prepare the result object that will be exposed with JSON


performFieldQuery

@RequestMapping(method=GET,
                params="methodToCall=performFieldQuery")
@ResponseBody
public AttributeQueryResult performFieldQuery(@ModelAttribute(value="KualiForm")
                                                                          UifFormBase form,
                                                                          org.springframework.validation.BindingResult result,
                                                                          javax.servlet.http.HttpServletRequest request,
                                                                          javax.servlet.http.HttpServletResponse response)
Invoked to execute the AttributeQuery associated with a field given the query parameters found in the request. This controller method picks out the query parameters from the request and calls AttributeQueryService to perform the field query and prepare the result object that will be exposed with JSON. The result is then used to update field values in the UI with client script.


hasDialogBeenDisplayed

protected boolean hasDialogBeenDisplayed(String dialogId,
                                         UifFormBase form)
returns whether this dialog has been displayed on the client

Parameters:
dialogId - - the id of the dialog
form - - form instance containing the request data
Returns:
boolean - true if dialog has been displayed, false if not

hasDialogBeenAnswered

protected boolean hasDialogBeenAnswered(String dialogId,
                                        UifFormBase form)
returns whether the dialog has already been answered by the user

Parameters:
dialogId - - identifier for the dialog group
form - - form instance containing the request data
Returns:
boolean - true if client has already responded to the dialog, false otherwise

getBooleanDialogResponse

protected boolean getBooleanDialogResponse(String dialogId,
                                           UifFormBase form,
                                           javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
Handles modal dialog interactions for a view controller When a controller method wishes to prompt the user for additional information before continuing to process the request.

If this modal dialog has not yet been presented to the user, a redirect back to the client is performed to display the modal dialog as a Lightbox. The DialogGroup identified by the dialogId is used as the Lightbox content.

If the dialog has already been answered by the user. The boolean value representing the option chosen by the user is returned back to the calling controller

Parameters:
dialogId - - identifier of the dialog group
form - - form instance containing the request data
request - - the http request
response - - the http response
Returns:
boolean - true if user chose affirmative response, false if negative response was chosen

getStringDialogResponse

protected String getStringDialogResponse(String dialogId,
                                         UifFormBase form,
                                         javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response)
Handles a modal dialog interaction with the client user when a String response is desired

Similar to askYesOrNoQuestion() but returns a string instead of a boolean. The string value is the key string of the key/value pair assigned to the button that the user chose.

Parameters:
dialogId - - identifier of the dialog group
form - - form instance containing the request data
request - - the http request
response - - the http response
Returns:
Throws:
Exception

showDialog

protected org.springframework.web.servlet.ModelAndView showDialog(String dialogId,
                                                                  UifFormBase form,
                                                                  javax.servlet.http.HttpServletRequest request,
                                                                  javax.servlet.http.HttpServletResponse response)
Complete the response directly and launch lightbox with dialog content upon returning back to the client. If it is an ajax request then set the ajaxReturnType and set the updateComponentId to the dialogId.

Need to build up the view/component properly as we would if we returned normally back to the DispatcherServlet from the controller method.

Parameters:
dialogId - - id of the dialog or group to use as content in the lightbox.
form - - the form associated with the view
request - - the http request
response - - the http response
Returns:
will return void. actually, won't return at all.
Throws:
Exception

returnFromLightbox

@RequestMapping(params="methodToCall=returnFromLightbox")
public org.springframework.web.servlet.ModelAndView returnFromLightbox(@ModelAttribute(value="KualiForm")
                                                                                      UifFormBase form,
                                                                                      org.springframework.validation.BindingResult result,
                                                                                      javax.servlet.http.HttpServletRequest request,
                                                                                      javax.servlet.http.HttpServletResponse response)
Common return point for dialogs

Determines the user responses to the dialog. Performs dialog management and then redirects to the original contoller method.

Parameters:
form - - current form
result - - binding result
request - - http request
response - - http response
Returns:
ModelAndView setup for redirect to original controller methodToCall
Throws:
Exception

performRedirect

protected org.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form,
                                                                       String baseUrl,
                                                                       Properties urlParameters)
Builds a ModelAndView instance configured to redirect to the URL formed by joining the base URL with the given URL parameters

Parameters:
form - current form instance
baseUrl - base url to redirect to
urlParameters - properties containing key/value pairs for the url parameters, if null or empty, the baseUrl will be used as the full URL
Returns:
ModelAndView configured to redirect to the given URL

performRedirect

protected org.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form,
                                                                       String redirectUrl)
Builds a ModelAndView instance configured to redirect to the given URL

Parameters:
form - current form instance
redirectUrl - URL to redirect to
Returns:
ModelAndView configured to redirect to the given URL

getMessageView

protected 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

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

Parameters:
form - UIF form instance
headerText - header text for the message view (can be blank)
messageText - text for the message to display
Returns:
ModelAndView

getUIFModelAndView

protected org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form)
Configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view

Parameters:
form - form instance containing the model data
Returns:
ModelAndView object with the contained form

getUIFModelAndView

protected org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form,
                                                                          String pageId)
Configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view

Parameters:
form - form instance containing the model data
pageId - id of the page within the view that should be rendered, can be left blank in which the current or default page is rendered
Returns:
ModelAndView object with the contained form

getUIFModelAndViewWithInit

protected org.springframework.web.servlet.ModelAndView getUIFModelAndViewWithInit(UifFormBase form,
                                                                                  String viewId)
Retrieves a new view instance for the given view id and then configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view

Parameters:
form - form instance containing the model data
viewId - id for the view that should be built
Returns:
ModelAndView object with the contained form

getUIFModelAndView

protected org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form,
                                                                          Map<String,Object> additionalViewAttributes)
Configures the ModelAndView instance containing the form data and pointing to the UIF generic spring view, additional attributes may be exposed to the view through the map argument

Parameters:
form - form instance containing the model data
additionalViewAttributes - map of additional attributes to expose, key will be string the object is exposed under
Returns:
ModelAndView object with the contained form

getViewService

protected ViewService getViewService()

tableCsvRetrieval

@RequestMapping(method=GET,
                params="methodToCall=tableCsvRetrieval",
                produces="text/csv")
@ResponseBody
public String tableCsvRetrieval(@ModelAttribute(value="KualiForm")
                                                            UifFormBase form,
                                                            org.springframework.validation.BindingResult result,
                                                            javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
Generates exportable table data as CSV based on the rich table selected

Parameters:
form - - current form
result - - binding result
request - - http request
response - - http response
Returns:

tableXlsRetrieval

@RequestMapping(method=GET,
                params="methodToCall=tableXlsRetrieval",
                produces="application/vnd.ms-excel")
@ResponseBody
public String tableXlsRetrieval(@ModelAttribute(value="KualiForm")
                                                            UifFormBase form,
                                                            org.springframework.validation.BindingResult result,
                                                            javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
Generates exportable table data in xsl based on the rich table selected

Parameters:
form - - current form
result - - binding result
request - - http request
response - - http response
Returns:

tableXmlRetrieval

@RequestMapping(method=GET,
                params="methodToCall=tableXmlRetrieval",
                produces="application/xml")
@ResponseBody
public String tableXmlRetrieval(@ModelAttribute(value="KualiForm")
                                                            UifFormBase form,
                                                            org.springframework.validation.BindingResult result,
                                                            javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
Generates exportable table data based on the rich table selected

Parameters:
form - - current form
result - - binding result
request - - http request
response - - http response
Returns:

retrieveCollectionPage

@RequestMapping(params="methodToCall=retrieveCollectionPage")
public org.springframework.web.servlet.ModelAndView retrieveCollectionPage(@ModelAttribute(value="KualiForm")
                                                                                          UifFormBase form,
                                                                                          org.springframework.validation.BindingResult result,
                                                                                          javax.servlet.http.HttpServletRequest request,
                                                                                          javax.servlet.http.HttpServletResponse response)
                                                                    throws Exception
Retrieve a page defined by the page number parameter for a collection

Parameters:
form - - Holds properties necessary to determine the View instance that will be used to render the UI
result - - represents binding results
request - - http servlet request data
response - - http servlet response object
Returns:
the ModelAndView object
Throws:
Exception

retrieveOriginalComponent

@RequestMapping(params="methodToCall=retrieveOriginalComponent")
public org.springframework.web.servlet.ModelAndView retrieveOriginalComponent(@ModelAttribute(value="KualiForm")
                                                                                             UifFormBase form,
                                                                                             org.springframework.validation.BindingResult result,
                                                                                             javax.servlet.http.HttpServletRequest request,
                                                                                             javax.servlet.http.HttpServletResponse response)
                                                                       throws Exception
Retrieves the original component as it exists in postedView without attempting to refresh it; fast and consistent when this is all that is needed

By passing in the "changeProperties" parameter to this controller method, properties can be changed on the retrieved component. However, keep in mind that since this method does not call the lifecycle on the returned component, properties which require a lifecycle to be run to affect the output of a component should not be set. Main use case is to affect attributes which are only used by the ftl. The "changeProperties" parameter must be in JSON in string from, ie "{\"propertyPath\": true}"; note the use of escaping, as this is required. The propertyPath defines the property on the component that needs to be changed during this retrieval. This call must be using the "update-component" return type.

Parameters:
form - - Holds properties necessary to determine the View instance that will be used to render the UI
result - - represents binding results
request - - http servlet request data
response - - http servlet response object
Returns:
the ModelAndView object
Throws:
Exception

tableJsonRetrieval

@RequestMapping(method=GET,
                params="methodToCall=tableJsonRetrieval")
public org.springframework.web.servlet.ModelAndView tableJsonRetrieval(@ModelAttribute(value="KualiForm")
                                                                                      UifFormBase form,
                                                                                      org.springframework.validation.BindingResult result,
                                                                                      javax.servlet.http.HttpServletRequest request,
                                                                                      javax.servlet.http.HttpServletResponse response)
Get method for getting aaData for jquery datatables which are using sAjaxSource option.

This will render the aaData JSON for the displayed page of the table matching the tableId passed in the request parameters.


createDataTablesPagingHelperInstance

protected DataTablesPagingHelper createDataTablesPagingHelperInstance(UifFormBase form,
                                                                      javax.servlet.http.HttpServletRequest request)
Creates a DataTablesPagingHelper which is used within tableJsonRetrieval(org.kuali.rice.krad.web.form.UifFormBase, org.springframework.validation.BindingResult, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) for rendering pages of data in JSON form.

This template method can be overridden to supply a custom extension of DataTablesPagingHelper e.g. for paging and sorting at the data layer.

Returns:
the DataTablesPagingHelper instance


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.