当前位置: 首页>>代码示例>>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;未经允许,请勿转载。