|
||||||||||
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.layout.LayoutManagerBase org.kuali.rice.krad.uif.layout.StackedLayoutManagerBase
public class StackedLayoutManagerBase
Layout manager that works with CollectionGroup
containers and
renders the collection lines in a vertical row
For each line of the collection, a Group
instance is created.
The group header contains a label for the line (summary information), the
group fields are the collection line fields, and the group footer contains
the line actions. All the groups are rendered using the
BoxLayoutManager
with vertical orientation.
Modify the lineGroupPrototype to change header/footer styles or any other customization for the line groups
Field Summary |
---|
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
---|
componentCode, namespaceCode |
Constructor Summary | |
---|---|
StackedLayoutManagerBase()
|
Method Summary | |
---|---|
void |
buildLine(LineBuilderContext lineBuilderContext)
Call to the layout manager to build the components necessary for the given collection line, within an active view lifecycle. |
protected String |
buildLineHeaderText(Object line,
Group lineGroup)
Builds the header text for the collection line |
Group |
getAddLineGroup()
Group instance that will be used for the add line |
Group |
getLineGroupPrototype()
Group instance that is used as a prototype for creating the collection line groups. |
Pager |
getPagerWidget()
The pagerWidget used for paging when the StackedLayout is using paging |
Field |
getSelectFieldPrototype()
Field instance that serves as a prototype for creating the select field on each line when CollectionGroup.isIncludeLineSelectionField() is true |
List<Group> |
getStackedGroups()
Final List of Groups to render for the collection |
List<Group> |
getStackedGroupsNoWrapper()
Used by reflection during the lifecycle to get groups for the lifecycle when not using a wrapper group |
FieldGroup |
getSubCollectionFieldGroupPrototype()
Field group instance that is used as a prototype for creating the sub-collection field groups. |
List<String> |
getSummaryFields()
List of attribute names from the collection line class that should be used to build the line summary. |
String |
getSummaryTitle()
Text to appears in the header for each collection lines Group. |
Class<? extends Container> |
getSupportedContainer()
Default Impl Determines what Container classes are supported by the
LayoutManager |
Group |
getWrapperGroup()
Group that will 'wrap' the generated collection lines so that they have a different layout from the general stacked layout |
boolean |
isActionsInLineGroup()
Flag that indicates whether actions will be added in the same group as the line items instead of in the footer of the line group |
void |
performApplyModel(Object model,
LifecycleElement component)
Called after the initialize phase to perform conditional logic based on the model data |
void |
performFinalize(Object model,
LifecycleElement element)
The last phase before the view is rendered |
void |
performInitialization(Object model)
Initializes the component |
void |
processPagingRequest(Object model,
CollectionGroup collectionGroup)
Invokes CollectionPagingHelper to carry out the
paging request. |
void |
setActionsInLineGroup(boolean actionsInLineGroup)
Set flag to add actions in the same group as the line items |
void |
setAddLineGroup(Group addLineGroup)
Setter for the add line group |
void |
setLineGroupPrototype(Group lineGroupPrototype)
Setter for the line group prototype |
void |
setPagerWidget(Pager pagerWidget)
Set the pagerWidget used for paging StackedLayouts |
void |
setSelectFieldPrototype(Field selectFieldPrototype)
Setter for the prototype instance for select fields |
void |
setStackedGroups(List<Group> stackedGroups)
Setter for the collection groups |
void |
setSubCollectionFieldGroupPrototype(FieldGroup subCollectionFieldGroupPrototype)
Setter for the sub-collection field group prototype |
void |
setSummaryFields(List<String> summaryFields)
Setter for the summary field name list |
void |
setSummaryTitle(String summaryTitle)
Setter for the summary title text |
void |
setWrapperGroup(Group wrapperGroup)
Setter for the wrapper group that will receive the generated line groups |
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions |
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase |
---|
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode, unwrap |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.kuali.rice.krad.uif.layout.StackedLayoutManager |
---|
getStyleClassesAsString |
Methods inherited from interface org.kuali.rice.krad.uif.layout.LayoutManager |
---|
addStyleClass, appendToStyle, getAdditionalCssClasses, getCssClasses, getLibraryCssClasses, getPropertyReplacers, getStyle, getTemplate, getTemplateName, setAdditionalCssClasses, setCssClasses, setLibraryCssClasses, setPropertyReplacers, setStyle, setTemplate, setTemplateName |
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions |
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
---|
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode |
Methods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement |
---|
checkMutable, getContext, getId, getPhasePathMapping, getViewPath, getViewStatus, initializePendingTasks, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContext, setId, setPhasePathMapping, setRender, setViewPath, setViewStatus, skipLifecycle |
Methods inherited from interface org.kuali.rice.krad.datadictionary.Copyable |
---|
clone, copy, preventModification, unwrap |
Constructor Detail |
---|
public StackedLayoutManagerBase()
Method Detail |
---|
public void performInitialization(Object model)
Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
performInitialization
in interface LifecycleElement
performInitialization
in class LayoutManagerBase
model
- - object instance containing the view dataComponentDefaultInitializeTask
public void performApplyModel(Object model, LifecycleElement component)
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel
in interface LifecycleElement
performApplyModel
in class LayoutManagerBase
model
- - Top level object containing the data (could be the form or a
top level business object, dto)component
- parent lifecycle elementpublic void performFinalize(Object model, LifecycleElement element)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
performFinalize
in class LayoutManagerBase
model
- - top level object containing the dataelement
- - parent componentpublic void buildLine(LineBuilderContext lineBuilderContext)
As the collection is being iterated over by the CollectionGroupLineBuilder
this method is invoked for each line. The builder will create copies of the configured fields and actions for
the line and pass into the layout manager so they can be assembled
buildLine
in interface CollectionLayoutManager
lineBuilderContext
- context for the line to be builtprotected String buildLineHeaderText(Object line, Group lineGroup)
Header text is built up by first the collection label, either specified on the collection definition or retrieved from the dictionary. Then for each summary field defined, the value from the model is retrieved and added to the header.
Note the getSummaryTitle()
field may have expressions defined, in which cause it will be copied to the
property expressions map to set the title for the line group (which will have the item context variable set)
line
- Collection line containing datalineGroup
- Group instance for rendering the line and whose title should be built
public void processPagingRequest(Object model, CollectionGroup collectionGroup)
CollectionPagingHelper
to carry out the
paging request.
Invoked when a paging request occurs to carry out the paging request.
processPagingRequest
in interface CollectionLayoutManager
model
- object containing the view's datacollectionGroup
- collection group the request was made forpublic Class<? extends Container> getSupportedContainer()
Container
classes are supported by the
LayoutManager
getSupportedContainer
in interface LayoutManager
getSupportedContainer
in class LayoutManagerBase
public String getSummaryTitle()
StackedLayoutManager.getSummaryFields()
to build up the final header
text
getSummaryTitle
in interface StackedLayoutManager
public void setSummaryTitle(String summaryTitle)
setSummaryTitle
in interface StackedLayoutManager
public List<String> getSummaryFields()
getSummaryFields
in interface StackedLayoutManager
buildLineHeaderText(Object, org.kuali.rice.krad.uif.container.Group)
public void setSummaryFields(List<String> summaryFields)
setSummaryFields
in interface StackedLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public Group getAddLineGroup()
Add line fields and actions configured on the
CollectionGroup
will be set onto the add line group (if add
line is enabled). If the add line group is not configured, a new instance
of the line group prototype will be used for the add line.
getAddLineGroup
in interface StackedLayoutManager
StackedLayoutManager.getAddLineGroup()
public void setAddLineGroup(Group addLineGroup)
setAddLineGroup
in interface StackedLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public Group getLineGroupPrototype()
getLineGroupPrototype
in interface StackedLayoutManager
public void setLineGroupPrototype(Group lineGroupPrototype)
setLineGroupPrototype
in interface StackedLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public FieldGroup getSubCollectionFieldGroupPrototype()
getSubCollectionFieldGroupPrototype
in interface CollectionLayoutManager
public void setSubCollectionFieldGroupPrototype(FieldGroup subCollectionFieldGroupPrototype)
setSubCollectionFieldGroupPrototype
in interface StackedLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public Field getSelectFieldPrototype()
CollectionGroup.isIncludeLineSelectionField()
is true
This prototype can be used to set the control used for the select field (generally will be a checkbox control)
in addition to styling and other setting. The binding path will be formed with using the
CollectionGroup.getLineSelectPropertyName()
or if not set the
framework
will use UifFormBase.getSelectedCollectionLines()
getSelectFieldPrototype
in interface StackedLayoutManager
public void setSelectFieldPrototype(Field selectFieldPrototype)
setSelectFieldPrototype
in interface StackedLayoutManager
public Group getWrapperGroup()
By default (when the wrapper group is null), each collection line will become a group and the groups are rendered one after another. If the wrapper group is configured, the generated groups will be inserted as the items for the wrapper group, and the layout manager configured for the wrapper group will determine how they are rendered. For example, the layout manager could be a grid layout configured for three columns, which would layout the first three lines horizontally then break to a new row.
getWrapperGroup
in interface StackedLayoutManager
public void setWrapperGroup(Group wrapperGroup)
setWrapperGroup
in interface StackedLayoutManager
public Pager getPagerWidget()
getPagerWidget
in interface StackedLayoutManager
public void setPagerWidget(Pager pagerWidget)
setPagerWidget
in interface StackedLayoutManager
@ViewLifecycleRestriction public List<Group> getStackedGroups()
List
of Groups to render for the collection
getStackedGroups
in interface StackedLayoutManager
public List<Group> getStackedGroupsNoWrapper()
There are no references to this method in the code, this is intentional. DO NOT REMOVE.
getStackedGroupsNoWrapper
in interface StackedLayoutManager
public void setStackedGroups(List<Group> stackedGroups)
setStackedGroups
in interface StackedLayoutManager
public boolean isActionsInLineGroup()
isActionsInLineGroup
in interface StackedLayoutManager
public void setActionsInLineGroup(boolean actionsInLineGroup)
setActionsInLineGroup
in interface StackedLayoutManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |