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

java.lang.Object
  extended by org.kuali.rice.krad.web.controller.UifControllerHelper

public class UifControllerHelper
extends Object

Provides helper methods that will be used during the request lifecycle

Created to avoid duplication of the methods used by the UifHandlerExceptionResolver

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

Constructor Summary
UifControllerHelper()
           
 
Method Summary
static 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 static ViewService getViewService()
           
static void postControllerHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, 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
static void prepareHistory(javax.servlet.http.HttpServletRequest request, UifFormBase form)
          Updates the history object (or constructs a new History) for the view we are getting ready to render
static void prepareViewForRendering(javax.servlet.http.HttpServletRequest request, UifFormBase form)
          Prepares the View instance contained on the form for rendering
static void removeUnusedBreadcrumbs(UifFormManager uifFormManager, String formKey, String lastFormKey)
          Remove unused forms from breadcrumb history
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UifControllerHelper

public UifControllerHelper()
Method Detail

getUIFModelAndView

public static 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

postControllerHandle

public static void postControllerHandle(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        Object handler,
                                        org.springframework.web.servlet.ModelAndView modelAndView)
                                 throws Exception
After the controller logic is executed, the form is placed into session and the corresponding view is prepared for rendering

Throws:
Exception

prepareHistory

public static void prepareHistory(javax.servlet.http.HttpServletRequest request,
                                  UifFormBase form)
Updates the history object (or constructs a new History) for the view we are getting ready to render

Parameters:
request - - Http request object containing the request parameters
form - - object containing the view data

prepareViewForRendering

public static void prepareViewForRendering(javax.servlet.http.HttpServletRequest request,
                                           UifFormBase form)
Prepares the View instance contained on the form for rendering

Parameters:
request - - request object
form - - form instance containing the data and view instance

removeUnusedBreadcrumbs

public static void removeUnusedBreadcrumbs(UifFormManager uifFormManager,
                                           String formKey,
                                           String lastFormKey)
Remove unused forms from breadcrumb history

When going back in the breadcrumb history some forms become unused in the breadcrumb history. Here the unused forms are being determine and removed from the server to free memory.

Parameters:
uifFormManager -
formKey - of the current form
lastFormKey - of the last form

getViewService

protected static ViewService getViewService()


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