use of org.mifos.dto.domain.CustomFieldDto in project head by mifos.
the class PersonActionForm method clear.
public void clear() {
this.personnelId = null;
this.level = null;
this.globalPersonnelNum = null;
this.officeId = null;
this.title = null;
this.firstName = null;
this.middleName = null;
this.secondLastName = null;
this.lastName = null;
this.status = null;
this.preferredLocale = null;
this.searchId = null;
this.loginName = null;
this.userPassword = null;
this.emailId = null;
this.governmentIdNumber = null;
this.dobDD = null;
this.dobMM = null;
this.dobYY = null;
this.passwordExpirationDateDD = null;
this.passwordExpirationDateMM = null;
this.passwordExpirationDateYY = null;
this.maritalStatus = null;
this.gender = null;
this.dateOfJoiningMFIDD = null;
this.dateOfJoiningMFIMM = null;
this.dateOfJoiningMFIYY = null;
this.dateOfJoiningBranch = null;
this.personnelRoles = new String[10];
this.input = null;
this.searchString = null;
address = new Address();
customFields = new ArrayList<CustomFieldDto>();
this.setQuestionGroups(null);
}
use of org.mifos.dto.domain.CustomFieldDto in project head by mifos.
the class ClientCustActionStrutsTest method testPreviewFailure_DuplicateOfferingsSelected.
@Test
public void testPreviewFailure_DuplicateOfferingsSelected() throws Exception {
savingsOffering1 = TestObjectFactory.createSavingsProduct("savingsPrd1", "s1", SavingsType.MANDATORY, ApplicableTo.CLIENTS, new Date(System.currentTimeMillis()));
setRequestPathInfo("/clientCustAction.do");
addRequestParameter("method", "load");
addRequestParameter("officeId", "3");
addRequestParameter("groupFlag", "0");
addRequestParameter(Constants.CURRENTFLOWKEY, flowKey);
actionPerform();
flowKey = (String) request.getAttribute(Constants.CURRENTFLOWKEY);
List<CustomFieldDto> customFieldDefs = getCustomFieldFromSession();
List<BusinessActivityEntity> povertyStatus = (List<BusinessActivityEntity>) SessionUtils.getAttribute(ClientConstants.POVERTY_STATUS, request);
setRequestPathInfo("/clientCustAction.do");
addRequestParameter("method", "next");
addRequestParameter("officeId", "3");
addRequestParameter("clientName.salutation", "1");
addRequestParameter("clientName.firstName", "Client");
addRequestParameter("clientName.lastName", "LastName");
addRequestParameter("spouseName.firstName", "Spouse");
addRequestParameter("spouseName.lastName", "LastName");
addRequestParameter("spouseName.nameType", "1");
addRequestDateParameter("dateOfBirth", "20/3/1987");
addRequestParameter("clientDetailView.gender", "1");
addRequestParameter("input", "personalInfo");
addRequestParameter("customerDetail.povertyStatus", povertyStatus.get(0).getId().toString());
int i = 0;
for (CustomFieldDto customFieldDef : customFieldDefs) {
addRequestParameter("customField[" + i + "].fieldId", customFieldDef.getFieldId().toString());
addRequestParameter("customField[" + i + "].fieldValue", "11");
i++;
}
addRequestParameter(Constants.CURRENTFLOWKEY, flowKey);
actionPerform();
List<SavingsDetailDto> savingsOfferingList = getSavingsOfferingsFromSession();
SavingsDetailDto savingsOffering = savingsOfferingList.get(0);
setRequestPathInfo("/clientCustAction.do");
addRequestParameter("method", "preview");
addRequestParameter("input", "mfiInfo");
addRequestParameter("formedByPersonnel", "1");
addRequestParameter("savingsOffering[0]", savingsOffering.getPrdOfferingId().toString());
addRequestParameter("savingsOffering[1]", savingsOffering.getPrdOfferingId().toString());
request.setAttribute(Constants.CURRENTFLOWKEY, flowKey);
SessionUtils.setAttribute(CustomerConstants.CUSTOMER_MEETING, new MeetingBO(RecurrenceType.MONTHLY, Short.valueOf("2"), new Date(), MeetingType.CUSTOMER_MEETING), request);
addRequestParameter(Constants.CURRENTFLOWKEY, flowKey);
actionPerform();
Assert.assertEquals("Duplicate Offerings", 1, getErrorSize(ClientConstants.ERRORS_DUPLICATE_OFFERING_SELECTED));
}
use of org.mifos.dto.domain.CustomFieldDto in project head by mifos.
the class GroupActionStrutsTest method testPreviewManageFailureForTrained.
@Test
public void testPreviewManageFailureForTrained() throws Exception {
request.setAttribute(Constants.CURRENTFLOWKEY, flowKey);
createGroupWithCenterAndSetInSession();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "manage");
addRequestParameter("officeId", "3");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
List<CustomFieldDto> customFieldDefs = getCustomFieldsFromSession();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "previewManage");
addRequestParameter("officeId", "3");
addRequestParameter("displayName", "group");
int i = 0;
for (CustomFieldDto customFieldDef : customFieldDefs) {
addRequestParameter("customField[" + i + "].fieldId", customFieldDef.getFieldId().toString());
addRequestParameter("customField[" + i + "].fieldValue", "Req");
i++;
}
addRequestParameter("trainedDate", "20/03/2006");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
Assert.assertEquals(1, getErrorSize());
Assert.assertEquals("Group Trained checkbox not checked ", 1, getErrorSize(CustomerConstants.TRAINED_CHECKED));
}
use of org.mifos.dto.domain.CustomFieldDto in project head by mifos.
the class GroupActionStrutsTest method testSuccessfulCreate_UnderCenter.
@Test
public void testSuccessfulCreate_UnderCenter() throws Exception {
createParentCustomer();
StaticHibernateUtil.flushAndClearSession();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "load");
addRequestParameter("centerSystemId", center.getGlobalCustNum());
actionPerform();
List<CustomFieldDto> customFieldDefs = getCustomFieldsFromSession();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "preview");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
addRequestParameter("displayName", "groupUnderCenter");
addRequestParameter("status", CustomerStatus.GROUP_PENDING.getValue().toString());
addRequestParameter("formedByPersonnel", center.getPersonnel().getPersonnelId().toString());
int i = 0;
for (CustomFieldDto customFieldDef : customFieldDefs) {
addRequestParameter("customField[" + i + "].fieldId", customFieldDef.getFieldId().toString());
addRequestParameter("customField[" + i + "].fieldValue", "11");
i++;
}
actionPerform();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "create");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
verifyNoActionErrors();
verifyForward(ActionForwards.create_success.toString());
GroupCustActionForm actionForm = (GroupCustActionForm) request.getSession().getAttribute("groupCustActionForm");
group = TestObjectFactory.getGroup(actionForm.getCustomerIdAsInt());
center = TestObjectFactory.getCenter(center.getCustomerId());
actionForm.setParentCustomer(null);
}
use of org.mifos.dto.domain.CustomFieldDto in project head by mifos.
the class GroupActionStrutsTest method testPreviewManageSuccess.
@Test
public void testPreviewManageSuccess() throws Exception {
request.setAttribute(Constants.CURRENTFLOWKEY, flowKey);
createGroupWithCenterAndSetInSession();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "manage");
addRequestParameter("officeId", "3");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
List<CustomFieldDto> customFieldDefs = getCustomFieldsFromSession();
setRequestPathInfo("/groupCustAction.do");
addRequestParameter("method", "previewManage");
addRequestParameter("officeId", "3");
addRequestParameter("displayName", "group");
int i = 0;
for (CustomFieldDto customFieldDef : customFieldDefs) {
addRequestParameter("customField[" + i + "].fieldId", customFieldDef.getFieldId().toString());
addRequestParameter("customField[" + i + "].fieldValue", "Req");
i++;
}
addRequestParameter("trained", "1");
addRequestParameter("trainedDate", "20/3/2006");
addRequestParameter(Constants.CURRENTFLOWKEY, (String) request.getAttribute(Constants.CURRENTFLOWKEY));
actionPerform();
verifyNoActionErrors();
verifyNoActionMessages();
verifyForward(ActionForwards.previewManage_success.toString());
}
Aggregations