Search in sources :

Example 1 with AddGroupMembershipForm

use of org.mifos.customers.group.struts.actionforms.AddGroupMembershipForm in project head by mifos.

the class AddGroupMembershipAction method updateParent.

@TransactionDemarcate(validateAndResetToken = true)
@CloseSession
public ActionForward updateParent(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    AddGroupMembershipForm actionForm = (AddGroupMembershipForm) form;
    Integer parentGroupId = actionForm.getParentGroupIdValue();
    ClientBO clientInSession = (ClientBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
    String globalCustNum = this.clientServiceFacade.transferClientToGroup(parentGroupId, clientInSession.getGlobalCustNum(), clientInSession.getVersionNo());
    ClientBO client = this.customerDao.findClientBySystemId(globalCustNum);
    SessionUtils.setAttribute(Constants.BUSINESS_KEY, client, request);
    return mapping.findForward(ActionForwards.view_client_details_page.toString());
}
Also used : ClientBO(org.mifos.customers.client.business.ClientBO) AddGroupMembershipForm(org.mifos.customers.group.struts.actionforms.AddGroupMembershipForm) CloseSession(org.mifos.framework.util.helpers.CloseSession) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 2 with AddGroupMembershipForm

use of org.mifos.customers.group.struts.actionforms.AddGroupMembershipForm in project head by mifos.

the class AddGroupMembershipAction method loadSearch.

@TransactionDemarcate(joinToken = true)
public ActionForward loadSearch(ActionMapping mapping, ActionForm form, @SuppressWarnings("unused") HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    AddGroupMembershipForm actionForm = (AddGroupMembershipForm) form;
    actionForm.setSearchString(null);
    return mapping.findForward(ActionForwards.loadSearch_success.toString());
}
Also used : AddGroupMembershipForm(org.mifos.customers.group.struts.actionforms.AddGroupMembershipForm) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Aggregations

AddGroupMembershipForm (org.mifos.customers.group.struts.actionforms.AddGroupMembershipForm)2 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)2 ClientBO (org.mifos.customers.client.business.ClientBO)1 CloseSession (org.mifos.framework.util.helpers.CloseSession)1