org.kuali.rice.krad.uif.field
Class InitializeDataFieldFromDictionaryTask
java.lang.Object
org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase<DataField>
org.kuali.rice.krad.uif.field.InitializeDataFieldFromDictionaryTask
- All Implemented Interfaces:
- Runnable, ViewLifecycleTask<DataField>
public class InitializeDataFieldFromDictionaryTask
- extends ViewLifecycleTaskBase<DataField>
Performs initialization on data fields based on attributes found in the data dictionary.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Method Summary |
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. |
InitializeDataFieldFromDictionaryTask
public InitializeDataFieldFromDictionaryTask(ViewLifecyclePhase phase)
- Constructor.
- Parameters:
phase
- The initialize phase for the data field.
performLifecycleTask
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.
- Specified by:
performLifecycleTask
in class ViewLifecycleTaskBase<DataField>
findNestedDictionaryAttribute
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
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
- Parameters:
propertyPath
- path of the property to use as dictionary attribute and to drill down on
- Returns:
- AttributeDefinition if found, or Null
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.