public class InitializeDataFieldFromDictionaryTask extends ViewLifecycleTaskBase<DataField>
Constructor and Description |
---|
InitializeDataFieldFromDictionaryTask(ViewLifecyclePhase phase)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected AttributeDefinition |
findNestedDictionaryAttribute(String propertyPath)
Recursively drills down the property path (if nested) to find an AttributeDefinition, the
first attribute definition found will be returned
|
protected void |
performLifecycleTask()
Sets properties of the
InputField (if blank) to the corresponding attribute
entry in the data dictionary
Performs phase-specific lifecycle processing tasks. |
getElementState, getElementType, run, toString
public InitializeDataFieldFromDictionaryTask(ViewLifecyclePhase phase)
phase
- The initialize phase for the data field.protected void performLifecycleTask()
InputField
(if blank) to the corresponding attribute
entry in the data dictionary
Performs phase-specific lifecycle processing tasks.performLifecycleTask
in class ViewLifecycleTaskBase<DataField>
protected AttributeDefinition findNestedDictionaryAttribute(String propertyPath)
e.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
propertyPath
- path of the property to use as dictionary attribute and to drill down onCopyright © 2005–2014 The Kuali Foundation. All rights reserved.