Search in sources :

Example 21 with KeyValue

use of org.kuali.rice.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class CollegeLevelOrganizationValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    IWantDocumentService iWantDocumentService = SpringContext.getBean(IWantDocumentService.class);
    List<LevelOrganization> cLevelOrganizations = iWantDocumentService.getCLevelOrganizations();
    keyValues.add(new ConcreteKeyValue("", ""));
    if (cLevelOrganizations != null) {
        for (LevelOrganization cLevelOrganization : cLevelOrganizations) {
            keyValues.add(new ConcreteKeyValue(cLevelOrganization.getCode(), cLevelOrganization.getCodeAndDescription()));
        }
    }
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) LevelOrganization(edu.cornell.kfs.module.purap.businessobject.LevelOrganization) ArrayList(java.util.ArrayList) IWantDocumentService(edu.cornell.kfs.module.purap.document.service.IWantDocumentService)

Example 22 with KeyValue

use of org.kuali.rice.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class OrderCompletedValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue("N", "I have <b>NOT</b> placed the order. (Click <b>approve</b> to submit to the FTC/BSC for processing) &nbsp; &nbsp; &nbsp;"));
    keyValues.add(new ConcreteKeyValue("Y", "I <b>HAVE</b> placed the order via pcard/eshop etc. (Click <b>approve</b> to finalize the order)"));
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 23 with KeyValue

use of org.kuali.rice.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class GroupTitleLineRenderer method buildFavoriteAccounts.

private String buildFavoriteAccounts(String accountPrefix) {
    int itemIdx = getItemIdx(accountPrefix);
    Integer accountLineId = null;
    if (isDocumentIntegratedFavoriteAccount()) {
        if (itemIdx >= 0) {
            accountLineId = ((PurchasingItemBase) ((PurchasingDocumentBase) this.getAccountingDocument()).getItem(itemIdx)).getFavoriteAccountLineIdentifier();
        } else {
            accountLineId = ((PurchasingDocumentBase) this.getAccountingDocument()).getFavoriteAccountLineIdentifier();
        }
    }
    StringBuffer favoriteAccountLine = new StringBuffer();
    favoriteAccountLine.append("<tr>");
    favoriteAccountLine.append("<th colspan=\"2\" align=\"right\" valign=\"middle\" class=\"bord-l-b\">");
    favoriteAccountLine.append("<div  align=\"right\">");
    favoriteAccountLine.append("Favorite Account");
    favoriteAccountLine.append("</div>");
    favoriteAccountLine.append("</th>");
    if (StringUtils.isBlank(accountPrefix)) {
        accountPrefix = "document.";
    }
    favoriteAccountLine.append("<td colspan=\"7\" class=\"infoline\">");
    favoriteAccountLine.append("<select name=\"").append(accountPrefix).append("favoriteAccountLineIdentifier\" id=\"").append(accountPrefix).append("favoriteAccountLineIdentifier\" title=\"* Favorite Account\">");
    FavoriteAccountValuesFinder accounts = new FavoriteAccountValuesFinder();
    for (KeyValue keyValue : (List<KeyValue>) accounts.getKeyValues()) {
        favoriteAccountLine.append("<option value=\"").append(keyValue.getKey());
        if (checkToAddError(accountPrefix + "favoriteAccountLineIdentifier")) {
            favoriteAccountLine.append(getSelected(accountLineId, keyValue.getKey()));
        } else {
            favoriteAccountLine.append("\" >");
        }
        favoriteAccountLine.append(keyValue.getValue());
        favoriteAccountLine.append("</option>\n");
    }
    favoriteAccountLine.append("</select>");
    if (checkToAddError(accountPrefix + "favoriteAccountLineIdentifier")) {
        favoriteAccountLine.append(getErrorIconImageTag());
    }
    favoriteAccountLine.append("</td>");
    favoriteAccountLine.append("<td valign=\"top\" class=\"infoline\">");
    favoriteAccountLine.append("<div style=\"text-align: center;\">");
    favoriteAccountLine.append("<input type=\"image\" name=\"methodToCall.addFavoriteAccount.line").append(itemIdx).append(".anchorFavoriteAnchor\" src=\"kr/static/images/tinybutton-add1.gif\" tabindex=\"0\" class=\"tinybutton\"");
    favoriteAccountLine.append(" title=\"Add Favorite  Accounting Line\" alt=\"Add Favorite Accounting Line\">");
    favoriteAccountLine.append("</input>");
    favoriteAccountLine.append("<br></div></td>");
    favoriteAccountLine.append("</tr>");
    return favoriteAccountLine.toString();
}
Also used : KeyValue(org.kuali.rice.core.api.util.KeyValue) ArrayList(java.util.ArrayList) List(java.util.List) PurchasingDocumentBase(org.kuali.kfs.module.purap.document.PurchasingDocumentBase) FavoriteAccountValuesFinder(edu.cornell.kfs.sys.businessobject.options.FavoriteAccountValuesFinder)

Example 24 with KeyValue

use of org.kuali.rice.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class CUConfidentialAttachmentTypeValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = new ArrayList<KeyValue>();
    keyValues.add(new ConcreteKeyValue(ConfidentialAttachmentTypeCodes.NON_CONFIDENTIAL_ATTACHMENT_TYPE, CUKFSConstants.NON_CONFIDENTIAL_ATTACHMENT_TYPE_LABEL));
    keyValues.add(new ConcreteKeyValue(ConfidentialAttachmentTypeCodes.CONFIDENTIAL_ATTACHMENT_TYPE, ConfidentialAttachmentTypeCodes.CONFIDENTIAL_ATTACHMENT_TYPE));
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) ArrayList(java.util.ArrayList)

Example 25 with KeyValue

use of org.kuali.rice.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.

the class TaxFpPaymentReasonValuesFinder method getKeyValues.

@SuppressWarnings("unchecked")
@Override
public List<KeyValue> getKeyValues() {
    List<KeyValue> keyValues = super.getKeyValues();
    keyValues.set(0, new ConcreteKeyValue(CUTaxConstants.ANY_OR_NONE_PAYMENT_REASON, "Any/None"));
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue)

Aggregations

KeyValue (org.kuali.rice.core.api.util.KeyValue)25 ArrayList (java.util.ArrayList)24 ConcreteKeyValue (org.kuali.rice.core.api.util.ConcreteKeyValue)24 KeyValuesService (org.kuali.kfs.krad.service.KeyValuesService)6 CheckReconSource (com.rsmart.kuali.kfs.cr.businessobject.CheckReconSource)1 ReversionCategory (edu.cornell.kfs.coa.businessobject.ReversionCategory)1 PaymentMethod (edu.cornell.kfs.fp.businessobject.PaymentMethod)1 InvoiceFrequency (edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency)1 InvoiceType (edu.cornell.kfs.module.cg.businessobject.InvoiceType)1 LevelOrganization (edu.cornell.kfs.module.purap.businessobject.LevelOrganization)1 IWantDocumentService (edu.cornell.kfs.module.purap.document.service.IWantDocumentService)1 FavoriteAccount (edu.cornell.kfs.sys.businessobject.FavoriteAccount)1 FavoriteAccountValuesFinder (edu.cornell.kfs.sys.businessobject.options.FavoriteAccountValuesFinder)1 Comparator (java.util.Comparator)1 List (java.util.List)1 Map (java.util.Map)1 Chart (org.kuali.kfs.coa.businessobject.Chart)1 ParameterService (org.kuali.kfs.coreservice.framework.parameter.ParameterService)1 PurchasingDocumentBase (org.kuali.kfs.module.purap.document.PurchasingDocumentBase)1 Bank (org.kuali.kfs.sys.businessobject.Bank)1