public class LookupControllerServiceImpl extends ControllerServiceImpl implements LookupControllerService
Constructor and Description |
---|
LookupControllerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected Properties |
buildReturnSelectedParameters(LookupForm lookupForm)
Builds all the request parameters for the return URL.
|
protected org.springframework.web.servlet.ModelAndView |
checkForModuleLookupRedirect(LookupForm lookupForm,
javax.servlet.http.HttpServletRequest request)
Checks for a module service that claims the lookup class as an EBO, and if found redirects to the URL
given by the module service.
|
org.springframework.web.servlet.ModelAndView |
clearValues(LookupForm lookupForm)
Carries out the clear values action by invoking the
Lookupable#performClear) method on the
configured lookupable (view helper) and then setting the cleared criteria onto the given form. |
org.springframework.web.servlet.ModelAndView |
deselectAllPages(LookupForm lookupForm)
Clears the form property
UifFormBase.getSelectedLookupResultsCache()
and the selected lines property. |
protected ModelAndViewService |
getModelAndViewService()
Instance of model and view service to use within the collection service.
|
protected String |
getMultiValueReturnFields(LookupForm lookupForm)
Builds a string containing the names of the fields being returned separated by a comma.
|
protected String |
getSelectedLineValues(LookupForm lookupForm)
Builds a string containing the selected line identifiers separated by a comma.
|
String |
returnSelected(LookupForm lookupForm,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
Builds the URL for returning back to the calling view and passing the selected line values.
|
org.springframework.web.servlet.ModelAndView |
search(LookupForm lookupForm)
Carries out the search action by invoking the
Lookupable#performSearch) method on the
configured lookupable (view helper) and then setting the results onto the given form. |
org.springframework.web.servlet.ModelAndView |
selectAllPages(LookupForm lookupForm)
Loops through all the lookup results generating the line identifier for each and adding the
resulting set of identifies to the form property
UifFormBase.getSelectedLookupResultsCache() . |
void |
setModelAndViewService(ModelAndViewService modelAndViewService) |
org.springframework.web.servlet.ModelAndView |
start(UifFormBase form)
Initial method called when requesting a new view instance.
|
cancel, checkViewAuthorization, getNavigationControllerService, sessionTimeout, setNavigationControllerService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancel, checkViewAuthorization, sessionTimeout
public LookupControllerServiceImpl()
public org.springframework.web.servlet.ModelAndView start(UifFormBase form)
start
in interface ControllerService
start
in class ControllerServiceImpl
form
- form instance containing the model dataprotected org.springframework.web.servlet.ModelAndView checkForModuleLookupRedirect(LookupForm lookupForm, javax.servlet.http.HttpServletRequest request)
lookupForm
- form instance containing the lookup datarequest
- http request being handledpublic org.springframework.web.servlet.ModelAndView search(LookupForm lookupForm)
Lookupable#performSearch)
method on the
configured lookupable (view helper) and then setting the results onto the given form.
Executes a search using the provided criteria and builds a list of results to return
to the user.search
in interface LookupControllerService
lookupForm
- form instance containing the lookup datapublic org.springframework.web.servlet.ModelAndView clearValues(LookupForm lookupForm)
Lookupable#performClear)
method on the
configured lookupable (view helper) and then setting the cleared criteria onto the given form.
Performs a reset (or clear) on the lookup criteria values.clearValues
in interface LookupControllerService
lookupForm
- form instance containing the lookup datapublic org.springframework.web.servlet.ModelAndView selectAllPages(LookupForm lookupForm)
UifFormBase.getSelectedLookupResultsCache()
.
Handles the select all pages action on the lookup results.selectAllPages
in interface LookupControllerService
lookupForm
- form instance containing the lookup datapublic org.springframework.web.servlet.ModelAndView deselectAllPages(LookupForm lookupForm)
UifFormBase.getSelectedLookupResultsCache()
and the selected lines property.
Handles the deselect all pages action on the lookup results.deselectAllPages
in interface LookupControllerService
lookupForm
- form instance containing the lookup datapublic String returnSelected(LookupForm lookupForm, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
We attempt to pass back all the selected line identifiers as a request parameter on the return URL. However, this could result in an URL longer than the max length supported by browsers (the most restrictive is used). If this happens, for local lookups we use Spring flash attributes. In the case of a remote lookup, there is nothing we can do and return an error message.
Invoked from the UI to return the selected lookup results lines back to the calling view.returnSelected
in interface LookupControllerService
lookupForm
- form instance containing the lookup dataredirectAttributes
- spring provided redirect attributesprotected Properties buildReturnSelectedParameters(LookupForm lookupForm)
lookupForm
- form instance containing the lookup dataprotected String getMultiValueReturnFields(LookupForm lookupForm)
lookupForm
- form instance containing the lookup dataprotected String getSelectedLineValues(LookupForm lookupForm)
lookupForm
- form instance containing the lookup dataprotected ModelAndViewService getModelAndViewService()
getModelAndViewService
in class ControllerServiceImpl
public void setModelAndViewService(ModelAndViewService modelAndViewService)
setModelAndViewService
in class ControllerServiceImpl
getModelAndViewService()
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.