Search in sources :

Example 1 with CustomerSearch

use of org.mifos.application.servicefacade.CustomerSearch in project head by mifos.

the class CenterCustAction method searchTransfer.

@TransactionDemarcate(joinToken = true)
public ActionForward searchTransfer(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    cleanUpSearch(request);
    CenterCustActionForm actionForm = (CenterCustActionForm) form;
    String searchString = actionForm.getSearchString();
    CustomerSearch searchResult = this.customerServiceFacade.search(searchString);
    addSeachValues(searchString, searchResult.getOfficeId(), searchResult.getOfficeName(), request);
    SessionUtils.setQueryResultAttribute(Constants.SEARCH_RESULTS, searchResult.getSearchResult(), request);
    return mapping.findForward(ActionForwards.transferSearch_success.toString());
}
Also used : CenterCustActionForm(org.mifos.customers.center.struts.actionforms.CenterCustActionForm) CustomerSearch(org.mifos.application.servicefacade.CustomerSearch) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 2 with CustomerSearch

use of org.mifos.application.servicefacade.CustomerSearch in project head by mifos.

the class CenterCustAction method search.

/**
     * invoked when searching for centers from group creation screen
     */
@Override
@TransactionDemarcate(joinToken = true)
public ActionForward search(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    ActionForward actionForward = super.search(mapping, form, request, response);
    CenterCustActionForm actionForm = (CenterCustActionForm) form;
    String searchString = actionForm.getSearchString();
    CustomerSearch searchResult = this.customerServiceFacade.search(searchString);
    addSeachValues(searchString, searchResult.getOfficeId(), searchResult.getOfficeName(), request);
    SessionUtils.setQueryResultAttribute(Constants.SEARCH_RESULTS, searchResult.getSearchResult(), request);
    return actionForward;
}
Also used : CenterCustActionForm(org.mifos.customers.center.struts.actionforms.CenterCustActionForm) CustomerSearch(org.mifos.application.servicefacade.CustomerSearch) ActionForward(org.apache.struts.action.ActionForward) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Aggregations

CustomerSearch (org.mifos.application.servicefacade.CustomerSearch)2 CenterCustActionForm (org.mifos.customers.center.struts.actionforms.CenterCustActionForm)2 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)2 ActionForward (org.apache.struts.action.ActionForward)1