use of org.mifos.dto.screen.ListElement in project head by mifos.
the class SavingsProductFormBeanAssembler method populateFrequencyPeriodDropdown.
private void populateFrequencyPeriodDropdown(SavingsProductFormDto referenceData, SavingsProductFormBean formBean) {
Map<String, String> frequencyPeriods = new LinkedHashMap<String, String>();
for (ListElement option : referenceData.getInterestTimePeriodTypes()) {
frequencyPeriods.put(option.getId().toString(), option.getName());
}
formBean.setFrequencyPeriodOptions(frequencyPeriods);
}
use of org.mifos.dto.screen.ListElement in project head by mifos.
the class SavingsProductFormBeanAssembler method populateInterestBalanceDropdown.
private void populateInterestBalanceDropdown(SavingsProductFormDto referenceData, SavingsProductFormBean formBean) {
Map<String, String> interestBalanceTypes = new LinkedHashMap<String, String>();
for (ListElement option : referenceData.getInterestBalanceTypes()) {
interestBalanceTypes.put(option.getId().toString(), option.getName());
}
formBean.setInterestCaluclationOptions(interestBalanceTypes);
}
use of org.mifos.dto.screen.ListElement in project head by mifos.
the class SystemUserController method createUserFormBean.
public UserFormBean createUserFormBean(final Long officeId, final UserFormBean formBean) {
OfficeDto selectedOffice = this.officeServiceFacade.retrieveOfficeById(officeId.shortValue());
formBean.setOfficeId(officeId);
formBean.setOfficeName(selectedOffice.getName());
MandatoryHiddenFieldsDto dtoFields = this.adminServiceFacade.retrieveHiddenMandatoryFields();
formBean.getAddress().setAddress1Mandatory(dtoFields.isMandatorySystemAddress1());
formBean.getAddress().setAddress2Hidden(dtoFields.isHideSystemAddress2());
formBean.getAddress().setAddress3Hidden(dtoFields.isHideSystemAddress3());
formBean.getAddress().setCityDistrictHidden(dtoFields.isHideSystemCity());
formBean.getAddress().setStateHidden(dtoFields.isHideSystemState());
formBean.getAddress().setCountryHidden(dtoFields.isHideSystemCountry());
formBean.getAddress().setPostalCodeHidden(dtoFields.isHideSystemPostalCode());
DefinePersonnelDto userRefData = this.personnelServiceFacade.retrieveInfoForNewUserDefinition(officeId.shortValue());
Map<String, String> genderOptions = new LinkedHashMap<String, String>();
for (ListElement option : userRefData.getGenderList()) {
genderOptions.put(option.getId().toString(), option.getName());
}
formBean.setGenderOptions(genderOptions);
Map<String, String> maritalStatusOptions = new LinkedHashMap<String, String>();
for (ListElement option : userRefData.getMaritalStatusList()) {
maritalStatusOptions.put(option.getId().toString(), option.getName());
}
formBean.setMaritalStatusOptions(maritalStatusOptions);
Map<String, String> preferredLanguageOptions = new LinkedHashMap<String, String>();
for (ListElement option : userRefData.getLanguageList()) {
preferredLanguageOptions.put(option.getId().toString(), option.getName());
}
formBean.setPreferredLanguageOptions(preferredLanguageOptions);
Map<String, String> userTitleOptions = new LinkedHashMap<String, String>();
for (ListElement option : userRefData.getTitleList()) {
userTitleOptions.put(option.getId().toString(), option.getName());
}
formBean.setUserTitleOptions(userTitleOptions);
Map<String, String> userHierarchyOptions = new LinkedHashMap<String, String>();
for (ListElement option : userRefData.getPersonnelLevelList()) {
userHierarchyOptions.put(option.getId().toString(), option.getName());
}
formBean.setUserHierarchyOptions(userHierarchyOptions);
Map<String, String> availableRolesOptions = new LinkedHashMap<String, String>();
for (ListElement option : userRefData.getRolesList()) {
availableRolesOptions.put(option.getId().toString(), option.getName());
}
formBean.setAvailableRolesOptions(availableRolesOptions);
formBean.setSelectedRolesOptions(new LinkedHashMap<String, String>());
DateTime today = new DateTime();
formBean.setMfiJoiningDateDay(today.getDayOfMonth());
formBean.setMfiJoiningDateMonth(today.getMonthOfYear());
formBean.setMfiJoiningDateYear(today.getYearOfEra());
return formBean;
}
use of org.mifos.dto.screen.ListElement in project head by mifos.
the class LoanProductFormBeanAssembler method populateCurrenciesDropdown.
private void populateCurrenciesDropdown(LoanProductFormDto loanProductRefData, LoanProductFormBean loanProductFormBean) {
Map<String, String> currencyOptions = new LinkedHashMap<String, String>();
for (ListElement currency : loanProductRefData.getCurrencyOptions()) {
currencyOptions.put(currency.getId().toString(), currency.getName());
}
loanProductFormBean.setCurrencyOptions(currencyOptions);
loanProductFormBean.setMultiCurrencyEnabled(loanProductRefData.isMultiCurrencyEnabled());
}
use of org.mifos.dto.screen.ListElement in project head by mifos.
the class LoanProductFormBeanAssembler method populateGracePeriodDrowdown.
private void populateGracePeriodDrowdown(LoanProductFormDto loanProductRefData, LoanProductFormBean loanProductFormBean) {
Map<String, String> gracePeriodTypeOptions = new LinkedHashMap<String, String>();
for (ListElement gracePeriod : loanProductRefData.getGracePeriodTypes()) {
gracePeriodTypeOptions.put(gracePeriod.getId().toString(), gracePeriod.getName());
}
loanProductFormBean.setGracePeriodTypeOptions(gracePeriodTypeOptions);
loanProductFormBean.setSelectedGracePeriodType("1");
}
Aggregations