public class ViewIndex extends Object implements Serializable
View
instance for convenient retrieval during the lifecycle.Constructor and Description |
---|
ViewIndex()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearIndex(View view)
Clears view indexes, for reinitializing indexes at the start of each phase.
|
ViewIndex |
copy()
Returns a clone of the view index.
|
CollectionGroup |
getCollectionGroupByPath(String collectionPath)
Retrieves a
CollectionGroup instance from the index |
Map<String,CollectionGroup> |
getCollectionsIndex()
Gets the Map that contains collection indexing information.
|
Component |
getComponentById(String id)
Retrieves a
Component from the view index by Id |
DataField |
getDataFieldByPath(String propertyPath)
Retrieves a
DataField instance from the index |
DataField |
getDataFieldByPropertyName(String propertyName)
Retrieves a
DataField instance that has the given property name specified (note
this is not the full binding path and first match is returned) |
Map<String,DataField> |
getDataFieldIndex()
Gets the Map that contains attribute field indexing information.
|
LifecycleElement |
getLifecycleElementByPath(String path)
Gets a lifecycle element instance by the given path (relative to the view).
|
Map<String,LifecycleElement> |
getLifecycleElementsByPath()
Gets the Map of lifecycle elements that are indexed by their path relative to the view.
|
void |
indexComponent(Component component)
Adds an entry to the main index for the given component.
|
boolean |
observeAssignedId(String id)
Observe an assigned ID.
|
public ViewIndex()
protected void clearIndex(View view)
public void indexComponent(Component component)
DataField
or CollectionGroup
an entry is created in the
corresponding indexes for those types as well. Then the #indexComponent method is called for
each of the component's children
If the component is already contained in the indexes, it will be replaced
DataField
instances are indexed by the attribute path. This is useful for
retrieving the InputField based on the incoming request parameter
CollectionGroup
instances are indexed by the collection path. This is useful for
retrieving the CollectionGroup based on the incoming request parameter
component
- component instance to indexpublic boolean observeAssignedId(String id)
id
- ID to observepublic Component getComponentById(String id)
Component
from the view index by Idid
- id for the component to retrievepublic DataField getDataFieldByPath(String propertyPath)
DataField
instance from the indexpropertyPath
- full path of the data field (from the form)public DataField getDataFieldByPropertyName(String propertyName)
DataField
instance that has the given property name specified (note
this is not the full binding path and first match is returned)propertyName
- property name for field to retrievepublic Map<String,LifecycleElement> getLifecycleElementsByPath()
public LifecycleElement getLifecycleElementByPath(String path)
path
- path of the element that should be returnedpublic Map<String,DataField> getDataFieldIndex()
DataField
instancepublic Map<String,CollectionGroup> getCollectionsIndex()
CollectionGroup
instancepublic CollectionGroup getCollectionGroupByPath(String collectionPath)
CollectionGroup
instance from the indexcollectionPath
- full path of the collection (from the form)Copyright © 2005–2015 The Kuali Foundation. All rights reserved.