/** * @see * org.kuali.kfs.module.ld.service.LaborInquiryOptionsService#isConsolidationSelected(java.util.Map, * java.util.Collection) * <p>KRAD Conversion: Lookupable performs checking for a particular attribute and return true * or false. This method is called from BaseFundsLookupableHelperServiceImpl.java, * CurrentFundsLookupableHelperServiceImpl.java, LedgerBalanceLookupableHelperServiceImpl.java * in ld module */ @Override public boolean isConsolidationSelected(Map fieldValues, Collection<Row> rows) { boolean isConsolidationSelected = isConsolidationSelected(fieldValues); if (!isConsolidationSelected) { Field consolidationField = getConsolidationField(rows); consolidationField.setPropertyValue(Constant.DETAIL); } return isConsolidationSelected; }
/** * Sets up the field for rendering by setting the right property name and zeroing out amounts * which aren't needed * * @param field the field to prepare * @param accountingLine the accounting line being rendered * @param count the count of the current line in the source lines, or null if it's a new line * <p>KRAD Conversion: Customization of preparing the fields for rendering - No use of data * dictionary */ protected void prepareFieldForRendering(Field field, VoucherForm form, Integer count) { getDebitOrCreditField().setPropertyPrefix(null); // set the right property name if (count == null) { field.setPropertyName(getNewLineProperty()); } else { final String subPropertyName = isDebit ? "debit" : "credit"; field.setPropertyName( getCollectionProperty() + "[" + count.toString() + "]." + subPropertyName); } // get the value from the form field.setPropertyValue(ObjectUtils.getPropertyValue(form, field.getPropertyName())); }
@Override public List<Row> getRows() { List<Row> rows = super.getRows(); for (Row row : rows) { for (Field field : row.getFields()) { if (field.getPropertyName().equals(USERNAME_FIELD)) { field.setFieldConversions(FIELD_CONVERSIONS); } if (field.getPropertyName().equals(LOG_STATUS) && isLookupToCreateProposal()) { field.setPropertyValue(STATUS_PENDING); } } } return rows; }