use of org.kuali.kfs.kns.web.struts.form.MultipleValueLookupForm in project cu-kfs by CU-CommunityApps.
the class BalanceInquiryLookupAction method prepareToReturnNone.
/**
* This method returns none of the selected results and redirects back to the lookup caller.
*
* @param mapping
* @param form must be an instance of MultipleValueLookupForm
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward prepareToReturnNone(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
prepareToReturnNone(multipleValueLookupForm);
// build the parameters for the refresh url
Properties parameters = new Properties();
parameters.put(KFSConstants.DOC_FORM_KEY, multipleValueLookupForm.getFormKey());
parameters.put(KFSConstants.DISPATCH_REQUEST_PARAMETER, KFSConstants.RETURN_METHOD_TO_CALL);
parameters.put(KFSConstants.REFRESH_CALLER, KFSConstants.MULTIPLE_VALUE);
if (!StringUtils.isBlank(multipleValueLookupForm.getLookupAnchor())) {
parameters.put(KFSConstants.ANCHOR, multipleValueLookupForm.getLookupAnchor());
}
String backUrl = UrlFactory.parameterizeUrl(multipleValueLookupForm.getBackLocation(), parameters);
return new ActionForward(backUrl, true);
}
use of org.kuali.kfs.kns.web.struts.form.MultipleValueLookupForm in project cu-kfs by CU-CommunityApps.
the class BalanceInquiryLookupAction method prepareToReturnSelectedResults.
/**
* This method does the processing necessary to return selected results and sends a redirect back to the lookup caller
*
* @param mapping
* @param form must be an instance of MultipleValueLookupForm
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward prepareToReturnSelectedResults(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
if (StringUtils.isBlank(multipleValueLookupForm.getLookupResultsSequenceNumber())) {
// no search was executed
return prepareToReturnNone(mapping, form, request, response);
}
prepareToReturnSelectedResultBOs(multipleValueLookupForm);
// build the parameters for the refresh url
Properties parameters = new Properties();
parameters.put(KFSConstants.LOOKUP_RESULTS_BO_CLASS_NAME, multipleValueLookupForm.getBusinessObjectClassName());
parameters.put(KFSConstants.LOOKUP_RESULTS_SEQUENCE_NUMBER, multipleValueLookupForm.getLookupResultsSequenceNumber());
parameters.put(KFSConstants.DOC_FORM_KEY, multipleValueLookupForm.getFormKey());
parameters.put(KFSConstants.DISPATCH_REQUEST_PARAMETER, KFSConstants.RETURN_METHOD_TO_CALL);
parameters.put(KFSConstants.REFRESH_CALLER, KFSConstants.MULTIPLE_VALUE);
if (!StringUtils.isBlank(multipleValueLookupForm.getLookupAnchor())) {
parameters.put(KFSConstants.ANCHOR, multipleValueLookupForm.getLookupAnchor());
}
String backUrl = UrlFactory.parameterizeUrl(multipleValueLookupForm.getBackLocation(), parameters);
return new ActionForward(backUrl, true);
}
Aggregations