|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.web.controller.UifControllerBase
public abstract class UifControllerBase
Base controller class for views within the KRAD User Interface Framework Provides common methods such as:
ModelAndView
View
and return the
ModelAndView
instance.
Field Summary | |
---|---|
protected static String |
REDIRECT_PREFIX
|
Constructor Summary | |
---|---|
UifControllerBase()
|
Method Summary | |
---|---|
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. |
protected void |
addMethodToCallToUncheckedList(String methodToCall)
Use to add a methodToCall to the a list which will not have authorization checks. |
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. |
void |
checkAuthorization(UifFormBase form,
String methodToCall)
Override this method to provide controller class-level access controls to the application. |
org.springframework.web.servlet.ModelAndView |
close(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. |
protected abstract UifFormBase |
createInitialForm(javax.servlet.http.HttpServletRequest request)
Called to create a new model(form) object when necessary. |
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. |
Set<String> |
getMethodToCallsToNotCheckAuthorization()
Returns an immutable Set of methodToCall parameters that should not be checked for authorization. |
protected Map<String,String> |
getRoleQualification(UifFormBase form,
String methodToCall)
Override this method to add data from the form for role qualification in the authorization check |
SessionDocumentService |
getSessionDocumentService()
|
protected org.springframework.web.servlet.ModelAndView |
getUIFModelAndView(UifFormBase form)
|
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 ViewService |
getViewService()
|
UifFormBase |
initForm(javax.servlet.http.HttpServletRequest request)
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 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)
|
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 |
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 forwards the view for rendering |
org.springframework.web.servlet.ModelAndView |
toggleInactiveRecordDisplay(UifFormBase uifForm,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Invoked to toggle the show inactive indicator on the selected collection group and then rerun the component lifecycle and rendering based on the updated indicator and form data |
org.springframework.web.servlet.ModelAndView |
updateComponent(UifFormBase form,
org.springframework.validation.BindingResult result,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Updates the current component by retrieving a fresh copy from the dictionary, running its component lifecycle, and returning it |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String REDIRECT_PREFIX
Constructor Detail |
---|
public UifControllerBase()
Method Detail |
---|
@ModelAttribute(value="KualiForm") public UifFormBase initForm(javax.servlet.http.HttpServletRequest request)
protected abstract UifFormBase createInitialForm(javax.servlet.http.HttpServletRequest request)
protected final void addMethodToCallToUncheckedList(String methodToCall)
public Set<String> getMethodToCallsToNotCheckAuthorization()
public void checkAuthorization(UifFormBase form, String methodToCall) throws AuthorizationException
AuthorizationException
protected Map<String,String> getRoleQualification(UifFormBase form, String methodToCall)
@RequestMapping(method=GET, 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)
@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)
@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)
@RequestMapping(method=POST, params="methodToCall=toggleInactiveRecordDisplay") public org.springframework.web.servlet.ModelAndView toggleInactiveRecordDisplay(@ModelAttribute(value="KualiForm") UifFormBase uifForm, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- - request object that should contain the request component id (for the collection group)
and the show inactive indicator value@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)
@RequestMapping(params="methodToCall=close") public org.springframework.web.servlet.ModelAndView close(@ModelAttribute(value="KualiForm") UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@RequestMapping(params="methodToCall=returnToPrevious") public org.springframework.web.servlet.ModelAndView returnToPrevious(@ModelAttribute(value="KualiForm") UifFormBase form)
form
- - form object that should contain the history object@RequestMapping(params="methodToCall=returnToHub") public org.springframework.web.servlet.ModelAndView returnToHub(@ModelAttribute(value="KualiForm") UifFormBase form)
form
- - form object that should contain the history objectpublic org.springframework.web.servlet.ModelAndView returnToHistory(UifFormBase form, boolean homeFlag)
form
- - form object that should contain the history objecthomeFlag
- - if true will navigate back to first entry else will navigate to last entry
in the history@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)
@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
Exception
@RequestMapping(method=POST, params="methodToCall=updateComponent") public org.springframework.web.servlet.ModelAndView updateComponent(@ModelAttribute(value="KualiForm") UifFormBase form, org.springframework.validation.BindingResult result, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- - the request must contain reqComponentId that specifies the component to retrieve@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)
@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)
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
@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)
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.
protected org.springframework.web.servlet.ModelAndView performRedirect(UifFormBase form, String baseUrl, Properties urlParameters)
ModelAndView
instance configured to redirect to the
URL formed by joining the base URL with the given URL parameters
form
- - current form instancebaseUrl
- - base url to redirect tourlParameters
- - properties containing key/value pairs for the url parameters
protected org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form)
protected org.springframework.web.servlet.ModelAndView getUIFModelAndView(UifFormBase form, String pageId)
ModelAndView
instance containing the form
data and pointing to the UIF generic spring view
form
- - 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 rendered
protected ViewService getViewService()
public SessionDocumentService getSessionDocumentService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |