org.kuali.kfs.gl.web.struts
Class BalanceInquiryLookupAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.DispatchAction
          extended by org.kuali.rice.kns.web.struts.action.KualiAction
              extended by org.kuali.rice.kns.web.struts.action.KualiLookupAction
                  extended by org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
                      extended by org.kuali.kfs.gl.web.struts.BalanceInquiryLookupAction
All Implemented Interfaces:
org.kuali.rice.kns.web.struts.action.KualiTableRenderAction

public class BalanceInquiryLookupAction
extends org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction

Balance inquiries are pretty much just lookups already, but are not used in the traditional sense. In most cases, balance inquiries only show the end-user data, and allow the end-user to drill-down into inquiries. A traditional lookup allows the user to return data to a form. This class is for balance inquiries implemented in the sense of a traditional lookup for forms that pull data out of inquiries.

One example of this is the SalaryExpenseTransferDocument which creates source lines from a labor ledger balance inquiry screen.

This is a KualiMultipleValueLookupAction which required some customization because requirements were not possible with displaytag.

See Also:
SalaryExpenseTransferDocument, org.kuali.kfs.module.ld.document.web.struts.SalaryExpenseTransferAction;, org.kuali.kfs.module.ld.document.web.struts.SalaryExpenseTransferForm;

Field Summary
static int DEFAULT_MAX_ROWS_PER_PAGE
          If there is no app param defined for the # rows/page, then this value will be used for the default
 
Fields inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
FORM_ACTION, FORWARD_NEXT, FORWARD_TEXT_AREA_UPDATE, METHOD_TO_CALL, POST_TEXT_AREA_TO_PARENT, TEXT_AREA_FIELD_ANCHOR, TEXT_AREA_FIELD_LABEL, TEXT_AREA_FIELD_NAME, TEXT_AREA_MAX_LENGTH, TEXT_AREA_READ_ONLY
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, messages, methods, types
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
BalanceInquiryLookupAction()
           
 
Method Summary
protected  Collection performMultipleValueLookup(org.kuali.rice.kns.web.struts.form.MultipleValueLookupForm multipleValueLookupForm, List<org.kuali.rice.kns.web.ui.ResultRow> resultTable, int maxRowsPerPage, boolean bounded)
          This method performs the lookup and returns a collection of lookup items.
 org.apache.struts.action.ActionForward prepareToReturnNone(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method returns none of the selected results and redirects back to the lookup caller.
 org.apache.struts.action.ActionForward prepareToReturnSelectedResults(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method does the processing necessary to return selected results and sends a redirect back to the lookup caller
 org.apache.struts.action.ActionForward search(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          search - sets the values of the data entered on the form on the jsp into a map and then searches for the results.
 org.apache.struts.action.ActionForward selectAll(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  List<org.kuali.rice.kns.web.ui.ResultRow> selectAll(org.kuali.rice.kns.web.struts.form.MultipleValueLookupForm multipleValueLookupForm, int maxRowsPerPage)
           
 org.apache.struts.action.ActionForward sort(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward switchToPage(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward unselectAll(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
cancel, clearValues, export, getMaxRowsPerPage, prepareToExport, prepareToReturnNone, prepareToReturnSelectedResultBOs, sort, switchToPage, unselectAll
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiLookupAction
checkAuthorization, customLookupableMethodCall, execute, refresh, start, supressActionsIfNeeded, viewResults
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
addMethodToCallToUncheckedList, defaultDispatch, dispatchMethod, doProcessingAfterPost, findMethodToCall, getApplicationBaseUrl, getBasePath, getBusinessObjectAuthorizationService, getEncryptionService, getHeaderTabDispatch, getHeaderTabNavigateTo, getImageContext, getKualiModuleService, getLineToDelete, getReturnLocation, getRoleQualification, getSelectedLine, getTabToToggle, headerTab, hideAllTabs, performInquiry, performLookup, performQuestionWithInput, performQuestionWithInputAgainBecauseOfErrors, performQuestionWithoutInput, performWorkgroupLookup, postTextAreaToParent, retrieveLookupParameterValue, showAllTabs, toggleTab, updateTextArea, validateLookupInquiryFullParameter
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, getMethod, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_ROWS_PER_PAGE

public static final int DEFAULT_MAX_ROWS_PER_PAGE
If there is no app param defined for the # rows/page, then this value will be used for the default

See Also:
KualiMultipleValueLookupAction.getMaxRowsPerPage(MultipleValueLookupForm), Constant Field Values
Constructor Detail

BalanceInquiryLookupAction

public BalanceInquiryLookupAction()
Method Detail

search

public org.apache.struts.action.ActionForward search(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws Exception
search - sets the values of the data entered on the form on the jsp into a map and then searches for the results.

Overrides:
search in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Throws:
Exception

prepareToReturnNone

public org.apache.struts.action.ActionForward prepareToReturnNone(org.apache.struts.action.ActionMapping mapping,
                                                                  org.apache.struts.action.ActionForm form,
                                                                  javax.servlet.http.HttpServletRequest request,
                                                                  javax.servlet.http.HttpServletResponse response)
                                                           throws Exception
This method returns none of the selected results and redirects back to the lookup caller.

Overrides:
prepareToReturnNone in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Parameters:
mapping -
form - must be an instance of MultipleValueLookupForm
request -
response -
Returns:
Throws:
Exception

prepareToReturnSelectedResults

public org.apache.struts.action.ActionForward prepareToReturnSelectedResults(org.apache.struts.action.ActionMapping mapping,
                                                                             org.apache.struts.action.ActionForm form,
                                                                             javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
                                                                      throws Exception
This method does the processing necessary to return selected results and sends a redirect back to the lookup caller

Overrides:
prepareToReturnSelectedResults in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Parameters:
mapping -
form - must be an instance of MultipleValueLookupForm
request -
response -
Returns:
Throws:
Exception

sort

public org.apache.struts.action.ActionForward sort(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws Exception
Specified by:
sort in interface org.kuali.rice.kns.web.struts.action.KualiTableRenderAction
Overrides:
sort in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Throws:
Exception
See Also:
KualiMultipleValueLookupAction.sort(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

selectAll

public org.apache.struts.action.ActionForward selectAll(org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
                                                 throws Exception
Overrides:
selectAll in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Throws:
Exception
See Also:
KualiMultipleValueLookupAction.selectAll(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

unselectAll

public org.apache.struts.action.ActionForward unselectAll(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws Exception
Overrides:
unselectAll in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Throws:
Exception
See Also:
KualiMultipleValueLookupAction.unselectAll(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

switchToPage

public org.apache.struts.action.ActionForward switchToPage(org.apache.struts.action.ActionMapping mapping,
                                                           org.apache.struts.action.ActionForm form,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
                                                    throws Exception
Specified by:
switchToPage in interface org.kuali.rice.kns.web.struts.action.KualiTableRenderAction
Overrides:
switchToPage in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Throws:
Exception
See Also:
KualiMultipleValueLookupAction.switchToPage(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

performMultipleValueLookup

protected Collection performMultipleValueLookup(org.kuali.rice.kns.web.struts.form.MultipleValueLookupForm multipleValueLookupForm,
                                                List<org.kuali.rice.kns.web.ui.ResultRow> resultTable,
                                                int maxRowsPerPage,
                                                boolean bounded)
This method performs the lookup and returns a collection of lookup items. Also initializes values in the form that will allow the multiple value lookup page to render

Overrides:
performMultipleValueLookup in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
Parameters:
multipleValueLookupForm -
resultTable - a list of result rows (used to generate what's shown in the UI). This list will be modified by this method
maxRowsPerPage -
bounded - whether the results will be bounded
Returns:
the list of result BOs, possibly bounded by size

selectAll

protected List<org.kuali.rice.kns.web.ui.ResultRow> selectAll(org.kuali.rice.kns.web.struts.form.MultipleValueLookupForm multipleValueLookupForm,
                                                              int maxRowsPerPage)
Overrides:
selectAll in class org.kuali.rice.kns.web.struts.action.KualiMultipleValueLookupAction
See Also:
KualiMultipleValueLookupAction.selectAll(org.kuali.rice.kns.web.struts.form.MultipleValueLookupForm, int)


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