本文整理匯總了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);
}
}
}