Search in sources :

Example 1 with TextControlDefinition

use of org.kuali.kfs.kns.datadictionary.control.TextControlDefinition in project cu-kfs by CU-CommunityApps.

the class SecurityRequestRoleQualificationDetail method getGenericAttributeEntry.

protected Map<String, Object> getGenericAttributeEntry() {
    Map<String, Object> attributeEntry = new HashMap<String, Object>();
    KimTypeAttribute attributeInfo = getKimType().getAttributeDefinitionById(attributeId);
    Map<String, Object> controlMap = new StringMap();
    TextControlDefinition textControl = new TextControlDefinition();
    textControl.setSize(15);
    controlMap.put("text", "true");
    controlMap.put("size", textControl.getSize().toString());
    controlMap.put("datePicker", Boolean.valueOf(textControl.isDatePicker()).toString());
    controlMap.put("ranged", Boolean.valueOf(textControl.isRanged()).toString());
    attributeEntry.put("control", controlMap);
    attributeEntry.put("name", attributeInfo.getKimAttribute().getAttributeName());
    String label = attributeInfo.getKimAttribute().getAttributeLabel();
    if (StringUtils.isBlank(label)) {
        label = attributeInfo.getKimAttribute().getAttributeName();
    }
    attributeEntry.put("label", label);
    attributeEntry.put("shortLabel", label);
    return attributeEntry;
}
Also used : TextControlDefinition(org.kuali.kfs.kns.datadictionary.control.TextControlDefinition) StringMap(org.kuali.kfs.krad.datadictionary.exporter.StringMap) KimTypeAttribute(org.kuali.kfs.kim.impl.type.KimTypeAttribute) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 KimTypeAttribute (org.kuali.kfs.kim.impl.type.KimTypeAttribute)1 TextControlDefinition (org.kuali.kfs.kns.datadictionary.control.TextControlDefinition)1 StringMap (org.kuali.kfs.krad.datadictionary.exporter.StringMap)1