Search in sources :

Example 31 with ListElement

use of org.mifos.dto.screen.ListElement in project head by mifos.

the class LoanProductFormBeanAssembler method populateApplicableFeeMultiSelectList.

private void populateApplicableFeeMultiSelectList(LoanProductFormDto loanProductRefData, LoanProductFormBean loanProductFormBean) {
    Map<String, String> applicableFeeOptions = new LinkedHashMap<String, String>();
    for (ListElement fee : loanProductRefData.getLoanFees()) {
        applicableFeeOptions.put(fee.getId().toString(), fee.getName());
    }
    loanProductFormBean.setApplicableFeeOptions(applicableFeeOptions);
}
Also used : ListElement(org.mifos.dto.screen.ListElement) LinkedHashMap(java.util.LinkedHashMap)

Example 32 with ListElement

use of org.mifos.dto.screen.ListElement in project head by mifos.

the class GeneralProductBeanAssembler method populateCategoryDropdown.

private void populateCategoryDropdown(List<ListElement> options, GeneralProductBean formBean) {
    Map<String, String> categoryOptions = new LinkedHashMap<String, String>();
    for (ListElement category : options) {
        categoryOptions.put(category.getId().toString(), category.getName());
    }
    formBean.setCategoryOptions(categoryOptions);
    if (options.size() == 1) {
        formBean.setSelectedCategory(options.get(0).getId().toString());
    }
}
Also used : ListElement(org.mifos.dto.screen.ListElement) LinkedHashMap(java.util.LinkedHashMap)

Example 33 with ListElement

use of org.mifos.dto.screen.ListElement in project head by mifos.

the class GeneralProductBeanAssembler method populateStatusDropdown.

private void populateStatusDropdown(List<ListElement> options, GeneralProductBean formBean) {
    Map<String, String> statusOptions = new LinkedHashMap<String, String>();
    for (ListElement status : options) {
        statusOptions.put(status.getId().toString(), status.getName());
    }
    formBean.setStatusOptions(statusOptions);
}
Also used : ListElement(org.mifos.dto.screen.ListElement) LinkedHashMap(java.util.LinkedHashMap)

Example 34 with ListElement

use of org.mifos.dto.screen.ListElement in project head by mifos.

the class GeneralProductBeanAssembler method populateApplicableForDropdown.

private void populateApplicableForDropdown(List<ListElement> options, GeneralProductBean formBean) {
    Map<String, String> applicableForOptions = new LinkedHashMap<String, String>();
    for (ListElement customerType : options) {
        applicableForOptions.put(customerType.getId().toString(), customerType.getName());
    }
    formBean.setApplicableForOptions(applicableForOptions);
}
Also used : ListElement(org.mifos.dto.screen.ListElement) LinkedHashMap(java.util.LinkedHashMap)

Example 35 with ListElement

use of org.mifos.dto.screen.ListElement in project head by mifos.

the class SavingsProductFormBeanAssembler method populateAppliesToDropdown.

private void populateAppliesToDropdown(SavingsProductFormDto referenceData, SavingsProductFormBean formBean) {
    Map<String, String> groupSavingsApproachOptions = new LinkedHashMap<String, String>();
    for (ListElement option : referenceData.getDespositAmountAppliesTo()) {
        groupSavingsApproachOptions.put(option.getId().toString(), option.getName());
    }
    formBean.setGroupSavingsApproachOptions(groupSavingsApproachOptions);
}
Also used : ListElement(org.mifos.dto.screen.ListElement) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

ListElement (org.mifos.dto.screen.ListElement)41 ArrayList (java.util.ArrayList)20 LinkedHashMap (java.util.LinkedHashMap)17 MifosRuntimeException (org.mifos.core.MifosRuntimeException)14 ValueListElement (org.mifos.dto.domain.ValueListElement)7 PersistenceException (org.mifos.framework.exceptions.PersistenceException)7 AddressDto (org.mifos.dto.domain.AddressDto)5 StatesInitializationException (org.mifos.framework.exceptions.StatesInitializationException)5 MifosUser (org.mifos.security.MifosUser)5 UserContext (org.mifos.security.util.UserContext)5 DateTime (org.joda.time.DateTime)4 OfficeBO (org.mifos.customers.office.business.OfficeBO)4 RoleBO (org.mifos.security.rolesandpermission.business.RoleBO)4 BusinessRuleException (org.mifos.service.BusinessRuleException)4 SavingsBO (org.mifos.accounts.savings.business.SavingsBO)3 CustomerStatusEntity (org.mifos.customers.business.CustomerStatusEntity)3 CreateOrUpdatePersonnelInformation (org.mifos.dto.domain.CreateOrUpdatePersonnelInformation)3 Address (org.mifos.framework.business.util.Address)3 LocalDate (org.joda.time.LocalDate)2 AccountStateEntity (org.mifos.accounts.business.AccountStateEntity)2