public class UifControllerHelper extends Object
Created to avoid duplication of the methods used by the UifHandlerExceptionResolver
Constructor and Description |
---|
UifControllerHelper() |
Modifier and Type | Method and Description |
---|---|
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 |
static String |
getViewIdFromRequest(javax.servlet.http.HttpServletRequest request)
Attempts to resolve a view id from the given request
|
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 |
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
|
protected static void |
updateViewTemplates(Component currentComponent,
UifFormBase form)
Update the view templates with the ones necessary to render the currentComponent passed in
|
public UifControllerHelper()
public static String getViewIdFromRequest(javax.servlet.http.HttpServletRequest request)
First an attempt will be made to find the view id as a request parameter. If no such request parameter is found, the request will be looked at for view type information and a call will be made to the view service to find the view id by type
If a view id is found it is stuck in the request as an attribute (under the key
UifParameters.VIEW_ID
) for subsequent retrieval
request
- instance to resolve view id forpublic static org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form, String pageId)
ModelAndView
instance containing the form
data and pointing to the UIF generic spring viewform
- - Form instance containing the model datapageId
- - Id of the page within the view that should be rendered, can
be left blank in which the current or default page is renderedpublic static void postControllerHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws Exception
Exception
protected static void updateViewTemplates(Component currentComponent, UifFormBase form)
currentComponent
- the component to use to update the templatesform
- the current formpublic static void prepareViewForRendering(javax.servlet.http.HttpServletRequest request, UifFormBase form)
View
instance contained on the form for renderingrequest
- - request objectform
- - form instance containing the data and view instancepublic static void removeUnusedBreadcrumbs(UifFormManager uifFormManager, String formKey, String lastFormKey)
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.
uifFormManager
- formKey
- of the current formlastFormKey
- of the last formprotected static ViewService getViewService()
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.