Class InitializeDataFieldFromDictionaryTask
java.lang.Object
org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase<DataField>
org.kuali.rice.krad.uif.lifecycle.initialize.InitializeDataFieldFromDictionaryTask
- All Implemented Interfaces:
Runnable,ViewLifecycleTask<DataField>
Performs initialization on data fields based on attributes found in the data dictionary.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeDefinitionfindNestedDictionaryAttribute(String propertyPath) Recursively drills down the property path (if nested) to find an AttributeDefinition, the first attribute definition found will be returnedprotected voidSets properties of theInputField(if blank) to the corresponding attribute entry in the data dictionary Performs phase-specific lifecycle processing tasks.Methods inherited from class org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase
getElementState, getElementType, run, setElementState, toString
-
Constructor Details
-
InitializeDataFieldFromDictionaryTask
public InitializeDataFieldFromDictionaryTask()Constructor.- Parameters:
phase- The initialize phase for the data field.
-
-
Method Details
-
performLifecycleTask
protected void performLifecycleTask()Sets properties of theInputField(if blank) to the corresponding attribute entry in the data dictionary Performs phase-specific lifecycle processing tasks.- Specified by:
performLifecycleTaskin classViewLifecycleTaskBase<DataField>
-
findNestedDictionaryAttribute
Recursively drills down the property path (if nested) to find an AttributeDefinition, the first attribute definition found will be returnede.g. suppose parentPath is 'document' and propertyPath is 'account.subAccount.name', first the property type for document will be retrieved using the view metadata and used as the dictionary entry, with the propertyPath as the dictionary attribute, if an attribute definition exists it will be returned. Else, the first part of the property path is added to the parent, making the parentPath 'document.account' and the propertyPath 'subAccount.name', the method is then called again to perform the process with those parameters. The recursion continues until an attribute field is found, or the propertyPath is no longer nested
- Parameters:
propertyPath- path of the property to use as dictionary attribute and to drill down on- Returns:
- AttributeDefinition if found, or Null
-