本文整理汇总了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;
}
示例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);
}
}
}