Search in sources :

Example 1 with CustomerSearchInputDto

use of org.mifos.customers.util.helpers.CustomerSearchInputDto in project head by mifos.

the class ClientTransferAction method loadParents.

@TransactionDemarcate(joinToken = true)
public ActionForward loadParents(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    CustomerSearchInputDto clientSearchInput = new CustomerSearchInputDto();
    clientSearchInput.setOfficeId(getUserContext(request).getBranchId());
    clientSearchInput.setCustomerInputPage(ClientConstants.INPUT_GROUP_TRANSFER);
    SessionUtils.setAttribute(CustomerConstants.CUSTOMER_SEARCH_INPUT, clientSearchInput, request.getSession());
    return mapping.findForward(ActionForwards.loadParents_success.toString());
}
Also used : CustomerSearchInputDto(org.mifos.customers.util.helpers.CustomerSearchInputDto) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 2 with CustomerSearchInputDto

use of org.mifos.customers.util.helpers.CustomerSearchInputDto in project head by mifos.

the class ClientTransferActionStrutsTest method testLoad_updateParent.

@Test
public void testLoad_updateParent() throws Exception {
    setRequestPathInfo("/clientTransferAction.do");
    addRequestParameter("method", "loadParents");
    addRequestParameter(Constants.CURRENTFLOWKEY, flowKey);
    actionPerform();
    verifyForward(ActionForwards.loadParents_success.toString());
    verifyNoActionErrors();
    verifyNoActionMessages();
    CustomerSearchInputDto clientSearchInput = (CustomerSearchInputDto) SessionUtils.getAttribute(CustomerConstants.CUSTOMER_SEARCH_INPUT, request.getSession());
    Assert.assertNotNull(clientSearchInput);
    Assert.assertEquals(TestObjectFactory.HEAD_OFFICE, clientSearchInput.getOfficeId());
}
Also used : CustomerSearchInputDto(org.mifos.customers.util.helpers.CustomerSearchInputDto) Test(org.junit.Test)

Aggregations

CustomerSearchInputDto (org.mifos.customers.util.helpers.CustomerSearchInputDto)2 Test (org.junit.Test)1 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)1