當前位置: 首頁>>代碼示例>>Java>>正文


Java FieldDefinitionI類代碼示例

本文整理匯總了Java中org.kuali.rice.kns.datadictionary.FieldDefinitionI的典型用法代碼示例。如果您正苦於以下問題:Java FieldDefinitionI類的具體用法?Java FieldDefinitionI怎麽用?Java FieldDefinitionI使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FieldDefinitionI類屬於org.kuali.rice.kns.datadictionary包,在下文中一共展示了FieldDefinitionI類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getSummaryFields

import org.kuali.rice.kns.datadictionary.FieldDefinitionI; //導入依賴的package包/類
/**
 * This method returns an ordered list of fields.
 * 
 * @param collSummaryFields
 * @param collectionDefinition
 * @return
 */
private static final List<Field> getSummaryFields(Map collSummaryFields, CollectionDefinitionI collectionDefinition) {
    List<Field> orderedSummaryFields = new ArrayList<Field>();
    for (FieldDefinitionI summaryField : collectionDefinition.getSummaryFields()) {
        String name = summaryField.getName();
        boolean found = false;
        Field addField = (Field) collSummaryFields.get(name);
        if (!(addField == null)) {
            orderedSummaryFields.add(addField);
            found = true;
        }

        if (!found) {
            // should we throw a real error here?
            LOG.error("summaryField " + summaryField + " not present in the list");
        }

    }
    return orderedSummaryFields;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:27,代碼來源:SectionBridge.java

示例2: setupField

import org.kuali.rice.kns.datadictionary.FieldDefinitionI; //導入依賴的package包/類
/**
  * Sets additional properties for MaintainableField(s)
  *
  * @param field The field to populate.
  * @param definition The DD specification for the field.
  */
 public static final void setupField(Field field, FieldDefinitionI definition, Set<String> conditionallyRequiredMaintenanceFields) {
     if (definition instanceof MaintainableFieldDefinition) {
         MaintainableFieldDefinition maintainableFieldDefinition = ((MaintainableFieldDefinition) definition);
         
         field.setFieldRequired(maintainableFieldDefinition.isRequired());
         field.setReadOnly(maintainableFieldDefinition.isUnconditionallyReadOnly());
         if (maintainableFieldDefinition.isLookupReadOnly()) {
         	field.setFieldType(Field.LOOKUP_READONLY);
         }

         // set onblur and callback functions
         if (StringUtils.isNotBlank(maintainableFieldDefinition.getWebUILeaveFieldFunction())) {
             field.setWebOnBlurHandler(maintainableFieldDefinition.getWebUILeaveFieldFunction());
         }

         if (StringUtils.isNotBlank(maintainableFieldDefinition.getWebUILeaveFieldCallbackFunction())) {
             field.setWebOnBlurHandlerCallback(maintainableFieldDefinition.getWebUILeaveFieldCallbackFunction());
         }

         if (maintainableFieldDefinition.getWebUILeaveFieldFunctionParameters()!=null) {
             field.setWebUILeaveFieldFunctionParameters(maintainableFieldDefinition.getWebUILeaveFieldFunctionParameters());
         }
         
if (StringUtils.isNotBlank(maintainableFieldDefinition.getAlternateDisplayAttributeName())) {
	field.setAlternateDisplayPropertyName(maintainableFieldDefinition.getAlternateDisplayAttributeName());
}

if (StringUtils.isNotBlank(maintainableFieldDefinition.getAdditionalDisplayAttributeName())) {
	field.setAdditionalDisplayPropertyName(maintainableFieldDefinition.getAdditionalDisplayAttributeName());
}
         
         if (conditionallyRequiredMaintenanceFields != null && conditionallyRequiredMaintenanceFields.contains(field.getPropertyName())) {
         	field.setFieldRequired(true);
         }
         
         if (((MaintainableFieldDefinition) definition).isTriggerOnChange()) {
         	field.setTriggerOnChange(true);
         }
     }
 }
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:47,代碼來源:FieldBridge.java


注:本文中的org.kuali.rice.kns.datadictionary.FieldDefinitionI類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。