|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.uif.util.UifWebUtils
public class UifWebUtils
Provides helper methods that will be used during the request lifecycle
Created to avoid duplication of the methods used by the UifHandlerExceptionResolver
Field Summary | |
---|---|
private static org.apache.log4j.Logger |
LOG
|
Constructor Summary | |
---|---|
UifWebUtils()
|
Method Summary | |
---|---|
static void |
checkMethodToCallAuthorization(javax.servlet.http.HttpServletRequest request,
UifControllerBase controller,
UifFormBase form)
Verify the user is authorized to invoke the controller method according to the module that owns the functionality. |
static org.springframework.web.servlet.ModelAndView |
getComponentModelAndView(Component component,
Object model)
|
static UifFormBase |
getFormFromRequest(javax.servlet.http.HttpServletRequest request)
Gets the form from the request. |
protected static SessionDocumentService |
getSessionDocumentService()
|
static org.springframework.web.servlet.ModelAndView |
getUIFModelAndView(UifFormBase form,
String viewId,
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 |
prepareViewForRendering(UifFormBase form)
Prepares the View instance contained on the form for
rendering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger LOG
Constructor Detail |
---|
public UifWebUtils()
Method Detail |
---|
public static UifFormBase getFormFromRequest(javax.servlet.http.HttpServletRequest request)
Looks for the form on the session by using the form key. If the form is not on the session it will attempt to get it from the database.
request
- the http request
public static org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form, String viewId, String pageId)
ModelAndView
instance containing the form
data and pointing to the UIF generic spring view
form
- - Form instance containing the model dataviewId
- - Id of the View to returnpageId
- - Id of the page within the view that should be rendered, can
be left blank in which the current or default page is rendered
public static org.springframework.web.servlet.ModelAndView getComponentModelAndView(Component component, Object model)
public static void postControllerHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws Exception
Exception
public static void checkMethodToCallAuthorization(javax.servlet.http.HttpServletRequest request, UifControllerBase controller, UifFormBase form)
request
- - current HTTP request containing method to call parametercontroller
- - controller that was invokedform
- - form instance containing the datapublic static void prepareViewForRendering(UifFormBase form)
View
instance contained on the form for
rendering
First a check is made to verify the view instance contained on the form has the same id as the view id on the form (id that was requested), if not a new view instance is retrieved for that view id. Then a check on the view status is made to determine if we need to run the full view life-cycle (in the case of a finalized view), or just the build steps (apply model and finalize). Finally the page is set on the view to reflect the page that was requested
form
- - form instance containing the data and view instanceprotected static SessionDocumentService getSessionDocumentService()
protected static ViewService getViewService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |