Search in sources :

Example 1 with ClientFamilyDetailsDto

use of org.mifos.dto.domain.ClientFamilyDetailsDto in project head by mifos.

the class ClientServiceFacadeWebTier method retrieveClientFamilyDetails.

@Override
public ClientFamilyDetailsDto retrieveClientFamilyDetails() {
    List<ValueListElement> genders = new ArrayList<ValueListElement>();
    List<ValueListElement> livingStatus = new ArrayList<ValueListElement>();
    List<FamilyDetailDto> familyDetails = new ArrayList<FamilyDetailDto>();
    boolean familyDetailsRequired = ClientRules.isFamilyDetailsRequired();
    if (familyDetailsRequired) {
        genders = this.customerDao.retrieveGenders();
        livingStatus = this.customerDao.retrieveLivingStatus();
        familyDetails.add(new FamilyDetailDto());
    }
    return new ClientFamilyDetailsDto(familyDetailsRequired, familyDetails, genders, livingStatus);
}
Also used : ArrayList(java.util.ArrayList) ClientFamilyDetailsDto(org.mifos.dto.domain.ClientFamilyDetailsDto) ClientFamilyDetailDto(org.mifos.dto.screen.ClientFamilyDetailDto) FamilyDetailDto(org.mifos.dto.domain.FamilyDetailDto) ValueListElement(org.mifos.dto.domain.ValueListElement)

Example 2 with ClientFamilyDetailsDto

use of org.mifos.dto.domain.ClientFamilyDetailsDto in project head by mifos.

the class PictureFormFile method next.

@TransactionDemarcate(joinToken = true)
public ActionForward next(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ClientCustActionForm actionForm = (ClientCustActionForm) form;
    ClientFamilyDetailsDto clientFamilyDetails = this.clientServiceFacade.retrieveClientFamilyDetails();
    if (clientFamilyDetails.isFamilyDetailsRequired()) {
        SessionUtils.setCollectionAttribute(ClientConstants.LIVING_STATUS_ENTITY, clientFamilyDetails.getLivingStatus(), request);
        SessionUtils.setCollectionAttribute(ClientConstants.GENDER_ENTITY, clientFamilyDetails.getGenders(), request);
        actionForm.setFamilyDetailBean(clientFamilyDetails.getFamilyDetails());
        return mapping.findForward(ActionForwards.next_success_family.toString());
    }
    return createClientQuestionnaire.fetchAppliedQuestions(mapping, actionForm, request, ActionForwards.next_success);
}
Also used : ClientCustActionForm(org.mifos.customers.client.struts.actionforms.ClientCustActionForm) ClientFamilyDetailsDto(org.mifos.dto.domain.ClientFamilyDetailsDto) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Aggregations

ClientFamilyDetailsDto (org.mifos.dto.domain.ClientFamilyDetailsDto)2 ArrayList (java.util.ArrayList)1 ClientCustActionForm (org.mifos.customers.client.struts.actionforms.ClientCustActionForm)1 FamilyDetailDto (org.mifos.dto.domain.FamilyDetailDto)1 ValueListElement (org.mifos.dto.domain.ValueListElement)1 ClientFamilyDetailDto (org.mifos.dto.screen.ClientFamilyDetailDto)1 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)1