Search in sources :

Example 11 with CenterCustActionForm

use of org.mifos.customers.center.struts.actionforms.CenterCustActionForm 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

CenterCustActionForm (org.mifos.customers.center.struts.actionforms.CenterCustActionForm)11 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)8 Test (org.junit.Test)3 CenterBO (org.mifos.customers.center.business.CenterBO)3 ApplicationException (org.mifos.framework.exceptions.ApplicationException)3 MeetingBO (org.mifos.application.meeting.business.MeetingBO)2 CustomerSearch (org.mifos.application.servicefacade.CustomerSearch)2 AddressDto (org.mifos.dto.domain.AddressDto)2 ApplicableAccountFeeDto (org.mifos.dto.domain.ApplicableAccountFeeDto)2 BusinessRuleException (org.mifos.service.BusinessRuleException)2 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 ActionForward (org.apache.struts.action.ActionForward)1 DateTime (org.joda.time.DateTime)1 LocalDate (org.joda.time.LocalDate)1 AmountFeeBO (org.mifos.accounts.fees.business.AmountFeeBO)1 ActionForwards (org.mifos.application.util.helpers.ActionForwards)1 MifosRuntimeException (org.mifos.core.MifosRuntimeException)1 FeeBuilder (org.mifos.domain.builders.FeeBuilder)1