|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.view.ViewIndex
public class ViewIndex
Holds field indexes of a View
instance for retrieval
Constructor Summary | |
---|---|
ViewIndex()
Constructs new instance |
Method Summary | |
---|---|
void |
addInitialComponentState(Component component)
Adds a copy of the given component instance to the map of initial component states keyed by the component factory id |
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 attributePath)
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. |
Map<String,Component> |
getInitialComponentStates()
Preserves initial state of components needed for doing component refreshes |
protected void |
index(View view)
Walks through the View tree and indexes all components found. |
void |
indexComponent(Component component)
Adds an entry to the main index for the given component. |
void |
setInitialComponentStates(Map<String,Component> initialComponentStates)
Setter for the map holding initial component states |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewIndex()
Method Detail |
---|
protected void index(View view)
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
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
component
- - component instance to indexpublic Component getComponentById(String id)
Component
from the view index by Id
id
- - id for the component to retrieve
public DataField getDataFieldByPath(String attributePath)
DataField
instance from the index
attributePath
- - full path of the attribute (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 retrieve
public Map<String,DataField> getDataFieldIndex()
DataField
instance
public Map<String,CollectionGroup> getCollectionsIndex()
CollectionGroup
instance
public CollectionGroup getCollectionGroupByPath(String collectionPath)
CollectionGroup
instance from the index
collectionPath
- - full path of the collection (from the form)
public Map<String,Component> getInitialComponentStates()
Some components, such as those that are nested or created in code cannot be requested from the spring factory to get new instances. For these a copy of the component in its initial state is set in this map which will be used when doing component refreshes (which requires running just that component's lifecycle)
Map entries are added during the perform initialize phase from ViewHelperService
public void addInitialComponentState(Component component)
component
- - component instance to addpublic void setInitialComponentStates(Map<String,Component> initialComponentStates)
initialComponentStates
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |