|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.uif.core.ComponentBase org.kuali.rice.kns.uif.container.ContainerBase org.kuali.rice.kns.uif.container.Group org.kuali.rice.kns.uif.container.CollectionGroup
public class CollectionGroup
Group that holds a collection of objects and configuration for presenting the collection in the UI. Supports functionality such as add line, line actions, and nested collections.
Note the standard header/footer can be used to give a header to the collection as a whole, or to provide actions that apply to the entire collection
For binding purposes the binding path of each row field is indexed. The name
property inherited from ComponentBase
is used as the collection
name. The collectionObjectClass property is used to lookup attributes from
the data dictionary.
Field Summary |
---|
Fields inherited from interface org.kuali.rice.kns.uif.core.Ordered |
---|
INITIAL_ORDER_VALUE |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
CollectionGroup()
|
Method Summary | |
---|---|
List<ActionField> |
getActionFields()
Action fields that should be rendered for each collection line. |
List<ActionField> |
getAddLineActionFields()
Action fields that should be rendered for the add line. |
BindingInfo |
getAddLineBindingInfo()
BindingInfo instance for the add line property used to
determine the full binding path. |
String |
getAddLineLabel()
Convenience getter for the add line label field text. |
LabelField |
getAddLineLabelField()
LabelField instance for the add line label |
String |
getAddLinePropertyName()
Name of the property that contains an instance for the add line. |
BindingInfo |
getBindingInfo()
Determines the binding path for the collection. |
CollectionGroupBuilder |
getCollectionGroupBuilder()
CollectionGroupBuilder instance that will build the
components dynamically for the collection instance |
Class<?> |
getCollectionObjectClass()
Object class the collection maintains. |
List<? extends Field> |
getItems()
List of Component instances that are held by
the container |
List<Component> |
getNestedComponents()
List of components that are contained within the component |
String |
getPropertyName()
Name of the property (relative to the parent object) the component binds to |
List<CollectionGroup> |
getSubCollections()
List of CollectionGroup instances that are sub-collections
of the collection represented by this collection group |
void |
initializeNewCollectionLine(View view,
Object model,
CollectionGroup collectionGroup,
boolean clearExistingLine)
New collection lines are handled in the framework by maintaining a map on the form. |
boolean |
isRenderAddLine()
Indicates whether an add line should be rendered for the collection |
boolean |
isRenderLineActions()
Indicates whether the action column for the collection should be rendered |
void |
performApplyModel(View view,
Object model)
Calls the configured CollectionGroupBuilder to build the
necessary components based on the collection data |
void |
performInitialization(View view)
The following actions are performed: Set fieldBindModelPath to the collection model path (since the fields have to belong to the same model as the collection) Set defaults for binding Sets the dictionary entry (if blank) on each of the items to the collection class |
void |
setActionFields(List<ActionField> actionFields)
Setter for the line action fields list |
void |
setAddLineActionFields(List<ActionField> addLineActionFields)
Setter for the add line action fields |
void |
setAddLineBindingInfo(BindingInfo addLineBindingInfo)
Setter for the add line binding info |
void |
setAddLineLabel(String addLineLabel)
Setter for the add line label text |
void |
setAddLineLabelField(LabelField addLineLabelField)
Setter for the LabelField instance for the add line label |
void |
setAddLinePropertyName(String addLinePropertyName)
Setter for the add line property name |
void |
setBindingInfo(BindingInfo bindingInfo)
Setter for the binding info instance |
void |
setCollectionGroupBuilder(CollectionGroupBuilder collectionGroupBuilder)
Setter for the collection group building instance |
void |
setCollectionObjectClass(Class<?> collectionObjectClass)
Setter for the collection object class |
void |
setPropertyName(String propertyName)
Setter for the collections property name |
void |
setRenderAddLine(boolean renderAddLine)
Setter for the render add line indicator |
void |
setRenderLineActions(boolean renderLineActions)
Setter for the render line actions indicator |
void |
setSubCollections(List<CollectionGroup> subCollections)
Setter for the sub collection list |
Methods inherited from class org.kuali.rice.kns.uif.container.Group |
---|
getAccordion, getComponentTypeName, getFieldBindByNamePrefix, getFieldBindingObjectPath, getSupportedComponents, setAccordion, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems |
Methods inherited from class org.kuali.rice.kns.uif.container.ContainerBase |
---|
getAdditionalMessageKeys, getAttributeFields, getErrorsField, getFooter, getHeader, getHelp, getItemOrderingSequence, getLayoutManager, getSummary, getSummaryMessageField, isFieldContainer, performFinalize, setAdditionalMessageKeys, setErrorsField, setFieldContainer, setFooter, setHeader, setHelp, setItemOrderingSequence, setLayoutManager, setRenderFooter, setRenderHeader, setSummary, setSummaryMessageField |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.kuali.rice.kns.uif.core.Component |
---|
addStyleClass, appendToStyle, getColSpan, getComponentModifiers, getComponentOptions, getConditionalReadOnly, getContext, getId, getOrder, getPropertiesForReferenceCopy, getPropertyReplacers, getRequired, getRowSpan, getStyle, getStyleClasses, getTemplate, getTitle, isHidden, isReadOnly, isRender, pushObjectToContext, setColSpan, setComponentModifiers, setComponentOptions, setConditionalReadOnly, setContext, setHidden, setId, setOrder, setPropertyReplacers, setReadOnly, setRender, setRequired, setRowSpan, setStyle, setStyleClasses, setTemplate, setTitle |
Constructor Detail |
---|
public CollectionGroup()
Method Detail |
---|
public void performInitialization(View view)
performInitialization
in interface Component
performInitialization
in class Group
view
- - view instance in which the component belongsComponentBase.performInitialization(org.kuali.rice.kns.uif.container.View)
public void performApplyModel(View view, Object model)
CollectionGroupBuilder
to build the
necessary components based on the collection data
performApplyModel
in interface Component
performApplyModel
in class ContainerBase
view
- - view instance to which the component belongsmodel
- - Top level object containing the data (could be the form or a
top level business object, dto)ContainerBase.performApplyModel(org.kuali.rice.kns.uif.container.View,
java.lang.Object)
public void initializeNewCollectionLine(View view, Object model, CollectionGroup collectionGroup, boolean clearExistingLine)
CollectionGroup
if an instance
is not available (clearExistingLine will force a new instance). The given
model must be a subclass of UifFormBase
in order to find the
Map.
model
- - Model instance that contains the new collection lines MapclearExistingLine
- - boolean that indicates whether the line should be set to a
new instance if it already existspublic List<Component> getNestedComponents()
Component
Used by ViewHelperService
for the various lifecycle
callbacks
getNestedComponents
in interface Component
getNestedComponents
in class Group
ContainerBase.getNestedComponents()
public Class<?> getCollectionObjectClass()
public void setCollectionObjectClass(Class<?> collectionObjectClass)
collectionObjectClass
- public String getPropertyName()
DataBinding
getPropertyName
in interface DataBinding
DataBinding.getPropertyName()
public void setPropertyName(String propertyName)
propertyName
- public BindingInfo getBindingInfo()
getBindingInfo
in interface DataBinding
DataBinding.getBindingInfo()
public void setBindingInfo(BindingInfo bindingInfo)
bindingInfo
- public List<ActionField> getActionFields()
public void setActionFields(List<ActionField> actionFields)
actionFields
- public boolean isRenderLineActions()
getActionFields()
public void setRenderLineActions(boolean renderLineActions)
renderLineActions
- public boolean isRenderAddLine()
public void setRenderAddLine(boolean renderAddLine)
renderAddLine
- public String getAddLineLabel()
LayoutManager
.
For the TableLayoutManager
the label appears in the sequence
column to the left of the add line fields. For the
StackedLayoutManager
the label is placed into the group
header for the line.
public void setAddLineLabel(String addLineLabel)
addLineLabel
- public LabelField getAddLineLabelField()
LabelField
instance for the add line label
getAddLineLabel()
public void setAddLineLabelField(LabelField addLineLabelField)
LabelField
instance for the add line label
addLineLabelField
- getAddLineLabel()
public String getAddLinePropertyName()
public void setAddLinePropertyName(String addLinePropertyName)
addLinePropertyName
- public BindingInfo getAddLineBindingInfo()
BindingInfo
instance for the add line property used to
determine the full binding path. If add line name given
getAddLineLabel()
then it is set as the binding name on the
binding info. Add line label and binding info are not required, in which
case the framework will manage the new add line instances through a
generic map (model must extend UifFormBase)
public void setAddLineBindingInfo(BindingInfo addLineBindingInfo)
addLineBindingInfo
- public List<ActionField> getAddLineActionFields()
public void setAddLineActionFields(List<ActionField> addLineActionFields)
addLineActionFields
- public List<CollectionGroup> getSubCollections()
CollectionGroup
instances that are sub-collections
of the collection represented by this collection group
public void setSubCollections(List<CollectionGroup> subCollections)
subCollections
- public CollectionGroupBuilder getCollectionGroupBuilder()
CollectionGroupBuilder
instance that will build the
components dynamically for the collection instance
public void setCollectionGroupBuilder(CollectionGroupBuilder collectionGroupBuilder)
collectionGroupBuilder
- public List<? extends Field> getItems()
Container
List
of Component
instances that are held by
the container
Contained components are rendered within the section template by calling
the associated LayoutManager
getItems
in interface Container
getItems
in class Group
ContainerBase.getItems()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |