|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.DictionaryBeanBase org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase org.kuali.rice.krad.uif.component.ComponentBase org.kuali.rice.krad.uif.container.ContainerBase org.kuali.rice.krad.uif.container.Group org.kuali.rice.krad.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.krad.uif.component.Ordered |
---|
INITIAL_ORDER_VALUE |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
CollectionGroup()
|
Method Summary | ||
---|---|---|
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. |
|
protected
|
copyProperties(T component)
Copies the properties over for the copy method |
|
CollectionFilter |
getActiveCollectionFilter()
Collection filter instance for filtering the collection data when the showInactive flag is set to false |
|
Action |
getAddBlankLineAction()
The add blank line Action field rendered when renderAddBlankLineButton is true |
|
String |
getAddItemCssClass()
The css style class that will be added on the add item group or row |
|
String |
getAddLabel()
Convenience getter for the add line label field text. |
|
List<Action> |
getAddLineActions()
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. |
|
List<? extends Component> |
getAddLineItems()
List of Component instances that should be rendered for the
collection add line (if enabled). |
|
Message |
getAddLineLabel()
Message instance for the add line label |
|
String |
getAddLinePlacement()
Indicates the add line placement |
|
String |
getAddLinePropertyName()
Name of the property that contains an instance for the add line. |
|
Action |
getAddViaLightBoxAction()
The Action that will be displayed that will open the add line group in a lightbox |
|
BindingInfo |
getBindingInfo()
Determines the binding path for the collection. |
|
CollectionGroupBuilder |
getCollectionGroupBuilder()
CollectionGroupBuilder instance that will build the
components dynamically for the collection instance |
|
CollectionGroupSecurity |
getCollectionGroupSecurity()
Collection Security object that indicates what authorization (permissions) exist for the collection |
|
QuickFinder |
getCollectionLookup()
Instance of the QuickFinder widget that configures a multi-value lookup for the collection |
|
Class<?> |
getCollectionObjectClass()
Object class the collection maintains. |
|
List<Component> |
getComponentPrototypes()
List of components that are maintained by the component as prototypes for creating other component instances |
|
protected Class<? extends ComponentSecurity> |
getComponentSecurityClass()
Returns the security class that is associated with the component (used for initialization and validation) |
|
List<Component> |
getComponentsForLifecycle()
List of components that are contained within the component and should be sent through the lifecycle |
|
int |
getDisplayCollectionSize()
The number of records to display for a collection |
|
int |
getDisplayLength()
Gets the displayLength, the number of items to display on the page (assuming useServerPaging is enabled). |
|
int |
getDisplayStart()
Gets the displayStart, the index of the first item to display on the page (assuming useServerPaging is enabled). |
|
int |
getFilteredCollectionSize()
Gets the number of un-filtered elements from the model collection. |
|
List<CollectionFilter> |
getFilters()
List of CollectionFilter instances that should be invoked to filter the collection before
displaying |
|
List<Action> |
getLineActions()
Action fields that should be rendered for each collection line. |
|
String |
getLineSelectPropertyName()
When isIncludeLineSelectionField() is true, gives the name of the property the select field
should bind to |
|
String |
getNewItemsCssClass()
The css style class that will be added on new items |
|
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 |
|
String |
getSubCollectionSuffix()
Suffix for IDs that identifies the collection line the sub-collection belongs to |
|
protected List<String> |
getTotalColumns()
|
|
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 |
isAddViaLightBox()
Indicates that a add action should be rendered and that the add group be displayed in a lightbox |
|
boolean |
isHighlightAddItem()
Indicates whether the add item group or row should be styled with the #addItemCssClass |
|
boolean |
isHighlightNewItems()
Indicates whether new items should be styled with the #newItemsCssClass |
|
boolean |
isIncludeLineSelectionField()
Indicates whether lines of the collection group should be selected by rendering a field for each line that will allow selection |
|
boolean |
isRenderAddBlankLineButton()
Indicates that a button will be rendered that allows the user to add blank lines to the collection |
|
boolean |
isRenderAddLine()
Indicates whether an add line should be rendered for the collection |
|
boolean |
isRenderInactiveToggleButton()
|
|
boolean |
isRenderLineActions()
Indicates whether the action column for the collection should be rendered |
|
boolean |
isRenderSaveLineActions()
Indicates whether the save line actions should be rendered |
|
boolean |
isShowInactiveLines()
Indicates whether inactive collections lines should be displayed |
|
boolean |
isUseServerPaging()
Gets useServerPaging, the flag that indicates whether server side paging is enabled. |
|
void |
performApplyModel(View view,
Object model,
Component parent)
Calls the configured CollectionGroupBuilder to build the
necessary components based on the collection data |
|
void |
performInitialization(View view,
Object model)
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 Default add line field list to groups items list Sets default active collection filter if not set Sets the dictionary entry (if blank) on each of the items to the collection class |
|
protected void |
pushCollectionGroupToReference()
Sets a reference in the context map for all nested components to the collection group instance, and sets name as parameter for an action fields in the group |
|
void |
setActiveCollectionFilter(CollectionFilter activeCollectionFilter)
Setter for the collection filter to use for filter inactive records from the collection |
|
void |
setAddBlankLineAction(Action addBlankLineAction)
Setter for the add blank line Action field |
|
void |
setAddItemCssClass(String addItemCssClass)
Setter for the add item css style class |
|
void |
setAddLabel(String addLabelText)
Setter for the add line label text |
|
void |
setAddLineActions(List<Action> addLineActions)
Setter for the add line action fields |
|
void |
setAddLineBindingInfo(BindingInfo addLineBindingInfo)
Setter for the add line binding info |
|
void |
setAddLineItems(List<? extends Component> addLineItems)
Setter for the add line field list |
|
void |
setAddLineLabel(Message addLineLabel)
Setter for the Message instance for the add line label |
|
void |
setAddLinePlacement(String addLinePlacement)
Setter for the add line placement |
|
void |
setAddLinePropertyName(String addLinePropertyName)
Setter for the add line property name |
|
void |
setAddViaLightBox(boolean addViaLightBox)
Setter for the flag to indicate that add groups should be displayed in a light box |
|
void |
setAddViaLightBoxAction(Action addViaLightBoxAction)
Setter for the add line via lightbox Action |
|
void |
setBindingInfo(BindingInfo bindingInfo)
Setter for the binding info instance |
|
void |
setCollectionGroupBuilder(CollectionGroupBuilder collectionGroupBuilder)
Setter for the collection group building instance |
|
void |
setCollectionLookup(QuickFinder collectionLookup)
Setter for the collection lookup quickfinder instance |
|
void |
setCollectionObjectClass(Class<?> collectionObjectClass)
Setter for the collection object class |
|
void |
setComponentSecurity(ComponentSecurity componentSecurity)
Override to assert a CollectionGroupSecurity instance is set |
|
void |
setDisplayCollectionSize(int displayCollectionSize)
Setter for the display collection size |
|
void |
setDisplayLength(int displayLength)
Sets the displayLength, the number of items to display on the page (assuming useServerPaging is enabled). |
|
void |
setDisplayStart(int displayStart)
Sets the displayStart, the index of the first item to display on the page (assuming useServerPaging is enabled). |
|
void |
setFilteredCollectionSize(int filteredCollectionSize)
Sets the number of un-filtered elements from the model collection. |
|
void |
setFilters(List<CollectionFilter> filters)
Setter for the List of collection filters for which the collection will be filtered against |
|
void |
setHighlightAddItem(boolean highlightAddItem)
Setter for the flag that allows for different styling of the add item group or row |
|
void |
setHighlightNewItems(boolean highlightNewItems)
Setter for the flag that allows for different styling of new items |
|
void |
setIncludeLineSelectionField(boolean includeLineSelectionField)
Setter for the render selected field indicator |
|
void |
setLineActions(List<Action> lineActions)
Setter for the line action fields list |
|
void |
setLineSelectPropertyName(String lineSelectPropertyName)
Setter for the property name that will bind to the select field |
|
void |
setNewItemsCssClass(String newItemsCssClass)
Setter for the new items css style class |
|
void |
setPropertyName(String propertyName)
Setter for the collections property name |
|
void |
setRenderAddBlankLineButton(boolean renderAddBlankLineButton)
Setter for the flag indicating that the add blank line button must be rendered |
|
void |
setRenderAddLine(boolean renderAddLine)
Setter for the render add line indicator |
|
void |
setRenderInactiveToggleButton(boolean renderInactiveToggleButton)
|
|
void |
setRenderLineActions(boolean renderLineActions)
Setter for the render line actions indicator |
|
void |
setRenderSaveLineActions(boolean renderSaveLineActions)
Setter for the flag indicating whether the save actions should be rendered |
|
void |
setShowInactiveLines(boolean showInactiveLines)
Setter for the show inactive indicator |
|
void |
setSubCollections(List<CollectionGroup> subCollections)
Setter for the sub collection list |
|
void |
setSubCollectionSuffix(String subCollectionSuffix)
Setter for the sub-collection suffix (used by framework, should not be set in configuration) |
|
protected void |
setTotalColumns(List<String> totalColumns)
Setter for the total columns |
|
void |
setUseServerPaging(boolean useServerPaging)
Sets useServerPaging, the flag indicating whether server side paging is enabled. |
Methods inherited from class org.kuali.rice.krad.uif.container.Group |
---|
getComponentTypeName, getDisclosure, getFieldBindByNamePrefix, getFieldBindingObjectPath, getItems, getScrollpane, getSupportedComponents, setDisclosure, setFieldBindByNamePrefix, setFieldBindingObjectPath, setItems, setScrollpane |
Methods inherited from class org.kuali.rice.krad.uif.container.ContainerBase |
---|
getDefaultItemPosition, getFooter, getHeader, getHeaderText, getHelp, getHelpTitle, getInstructionalMessage, getInstructionalText, getLayoutManager, getValidationMessages, performFinalize, setDefaultItemPosition, setFooter, setHeader, setHeaderText, setHelp, setInstructionalMessage, setInstructionalText, setLayoutManager, setRenderFooter, setRenderHeader, setTooltipOfComponent, setValidationMessages, sortItems |
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
---|
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode |
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.krad.datadictionary.uif.UifDictionaryBean |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
---|
getComponentCode, getNamespaceCode |
Constructor Detail |
---|
public CollectionGroup()
Method Detail |
---|
public void performInitialization(View view, Object model)
performInitialization
in interface Component
performInitialization
in class Group
view
- - view instance in which the component belongsmodel
- - object instance containing the view dataComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View,
java.lang.Object)
public void performApplyModel(View view, Object model, Component parent)
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.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.component.Component)
protected void pushCollectionGroupToReference()
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> getComponentsForLifecycle()
Component
Used by ViewHelperService
for the various lifecycle callbacks
getComponentsForLifecycle
in interface Component
getComponentsForLifecycle
in class Group
ContainerBase.getComponentsForLifecycle()
public List<Component> getComponentPrototypes()
Component
Prototypes are held for configuring how a component should be created during the lifecycle. An example of this are the fields in a collection group that are created for each collection record. They only participate in the initialize phase.
getComponentPrototypes
in interface Component
getComponentPrototypes
in class ContainerBase
Component.getComponentPrototypes()
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)
setBindingInfo
in interface DataBinding
bindingInfo
- public List<Action> getLineActions()
public void setLineActions(List<Action> lineActions)
lineActions
- public boolean isRenderLineActions()
getLineActions()
public void setRenderLineActions(boolean renderLineActions)
renderLineActions
- public boolean isRenderAddLine()
public void setRenderAddLine(boolean renderAddLine)
renderAddLine
- public String getAddLabel()
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 setAddLabel(String addLabelText)
addLabelText
- public Message getAddLineLabel()
Message
instance for the add line label
getAddLabel()
public void setAddLineLabel(Message addLineLabel)
Message
instance for the add line label
addLineLabel
- getAddLabel()
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
getAddLabel()
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<? extends Component> getAddLineItems()
Component
instances that should be rendered for the
collection add line (if enabled). If not set, the default group's items
list will be used
performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)
public void setAddLineItems(List<? extends Component> addLineItems)
addLineItems
- public List<Action> getAddLineActions()
public void setAddLineActions(List<Action> addLineActions)
addLineActions
- public boolean isIncludeLineSelectionField()
For example, having the select field enabled could allow selecting multiple lines from a search to return (multi-value lookup)
public void setIncludeLineSelectionField(boolean includeLineSelectionField)
includeLineSelectionField
- public String getLineSelectPropertyName()
isIncludeLineSelectionField()
is true, gives the name of the property the select field
should bind to
Note if no prefix is given in the property name, such as 'form.', it is assumed the property is contained on the collection line. In this case the binding path to the collection line will be appended. In other cases, it is assumed the property is a list or set of String that will hold the selected identifier strings
This property is not required. If not the set the framework will use a property contained on
UifFormBase
public void setLineSelectPropertyName(String lineSelectPropertyName)
lineSelectPropertyName
- public QuickFinder getCollectionLookup()
QuickFinder
widget that configures a multi-value lookup for the collection
If the collection lookup is enabled (by the render property of the quick finder), getCollectionObjectClass()
will be used as the data object class for the lookup (if not set). Field
conversions need to be set as usual and will be applied for each line returned
public void setCollectionLookup(QuickFinder collectionLookup)
collectionLookup
- public boolean isShowInactiveLines()
Setting only applies when the collection line type implements the
Inactivatable
interface. If true and showInactive is
set to false, the collection will be filtered to remove any items
whose active status returns false
public void setShowInactiveLines(boolean showInactiveLines)
showInactiveLines
- boolean show inactivepublic CollectionFilter getActiveCollectionFilter()
public void setActiveCollectionFilter(CollectionFilter activeCollectionFilter)
activeCollectionFilter
- CollectionFilter instancepublic List<CollectionFilter> getFilters()
CollectionFilter
instances that should be invoked to filter the collection before
displaying
public void setFilters(List<CollectionFilter> filters)
filters
- 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 String getSubCollectionSuffix()
Built by the framework as the collection lines are being generated
public void setSubCollectionSuffix(String subCollectionSuffix)
subCollectionSuffix
- public CollectionGroupSecurity getCollectionGroupSecurity()
public void setComponentSecurity(ComponentSecurity componentSecurity)
CollectionGroupSecurity
instance is set
setComponentSecurity
in interface Component
setComponentSecurity
in class ComponentBase
componentSecurity
- instance of CollectionGroupSecurityComponent.setComponentSecurity(org.kuali.rice.krad.uif.component.ComponentSecurity)
protected Class<? extends ComponentSecurity> getComponentSecurityClass()
ComponentBase
getComponentSecurityClass
in class ComponentBase
public CollectionGroupBuilder getCollectionGroupBuilder()
CollectionGroupBuilder
instance that will build the
components dynamically for the collection instance
public void setCollectionGroupBuilder(CollectionGroupBuilder collectionGroupBuilder)
collectionGroupBuilder
- public void setRenderInactiveToggleButton(boolean renderInactiveToggleButton)
renderInactiveToggleButton
- the showHideInactiveButton to setpublic boolean isRenderInactiveToggleButton()
public int getDisplayCollectionSize()
public void setDisplayCollectionSize(int displayCollectionSize)
displayCollectionSize
- public boolean isHighlightNewItems()
public void setHighlightNewItems(boolean highlightNewItems)
highlightNewItems
- public String getNewItemsCssClass()
public void setNewItemsCssClass(String newItemsCssClass)
newItemsCssClass
- public String getAddItemCssClass()
public void setAddItemCssClass(String addItemCssClass)
addItemCssClass
- public boolean isHighlightAddItem()
public void setHighlightAddItem(boolean highlightAddItem)
highlightAddItem
- public boolean isRenderAddBlankLineButton()
The button will be added separately from the collection items. The default add line wil not be rendered. The action of the button will call the controller, add the blank line to the collection and do a component refresh.
public void setRenderAddBlankLineButton(boolean renderAddBlankLineButton)
renderAddBlankLineButton
- public Action getAddBlankLineAction()
Action
field rendered when renderAddBlankLineButton is true
public void setAddBlankLineAction(Action addBlankLineAction)
Action
field
addBlankLineAction
- public String getAddLinePlacement()
Valid values are 'TOP' or 'BOTTOM'. The default is 'TOP'. When the value is 'BOTTOM' the blank line will be added to the end of the collection.
public void setAddLinePlacement(String addLinePlacement)
addLinePlacement
- add line placement stringpublic boolean isRenderSaveLineActions()
public void setRenderSaveLineActions(boolean renderSaveLineActions)
renderSaveLineActions
- public boolean isAddViaLightBox()
public void setAddViaLightBox(boolean addViaLightBox)
addViaLightBox
- public Action getAddViaLightBoxAction()
Action
that will be displayed that will open the add line group in a lightbox
public void setAddViaLightBoxAction(Action addViaLightBoxAction)
Action
addViaLightBoxAction
- public boolean isUseServerPaging()
public void setUseServerPaging(boolean useServerPaging)
useServerPaging
- the useServerPaging value to setpublic int getDisplayStart()
if this field has not been set, the returned value will be -1
public void setDisplayStart(int displayStart)
displayStart
- the displayStart to setpublic int getDisplayLength()
if this field has not been set, the returned value will be -1
public void setDisplayLength(int displayLength)
displayLength
- the displayLength to setpublic int getFilteredCollectionSize()
if this field has not been set, the returned value will be -1
public void setFilteredCollectionSize(int filteredCollectionSize)
This value is used for display and rendering purposes, it has no effect on the model collection
filteredCollectionSize
- the filtered collection sizeprotected List<String> getTotalColumns()
protected void setTotalColumns(List<String> totalColumns)
totalColumns
- public void completeValidation(ValidationTrace tracer)
Component
completeValidation
in interface Component
completeValidation
in class Group
tracer
- Record of component's locationComponent.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)
protected <T> void copyProperties(T component)
ComponentBase
copyProperties
in class Group
component
- base beanComponentBase.copy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |