|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.component.ConfigurableBase org.kuali.rice.krad.uif.layout.LayoutManagerBase org.kuali.rice.krad.uif.layout.StackedLayoutManager
public class StackedLayoutManager
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
Constructor Summary | |
---|---|
StackedLayoutManager()
|
Method Summary | |
---|---|
void |
buildLine(View view,
Object model,
CollectionGroup collectionGroup,
List<Field> lineFields,
List<FieldGroup> subCollectionFields,
String bindingPath,
List<Action> actions,
String idSuffix,
Object currentLine,
int lineIndex)
Builds a Group instance for a collection line. |
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 |
List<Component> |
getComponentPrototypes()
List of components that are maintained by the layout manager as prototypes for creating other component instances |
List<Component> |
getComponentsForLifecycle()
List of components that are contained within the layout manager that should be sent through the lifecycle |
Group |
getLineGroupPrototype()
Group instance that is used as a prototype for creating the collection line groups. |
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 |
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 |
Group |
getWrapperGroup()
Group that will 'wrap' the generated collection lines so that they have a different layout from the general stacked layout |
void |
performApplyModel(View view,
Object model,
Container container)
The following actions are performed: If wrapper group is specified, places the stacked groups into the wrapper |
void |
performInitialization(View view,
Object model,
Container container)
The following actions are performed: Initializes the prototypes |
void |
setAddLineGroup(Group addLineGroup)
Setter for the add line group |
void |
setLineGroupPrototype(Group lineGroupPrototype)
Setter for the line group prototype |
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.uif.layout.LayoutManagerBase |
---|
addStyleClass, appendToStyle, getContext, getCssClasses, getId, getPropertiesForReferenceCopy, getPropertyReplacers, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, performFinalize, pushObjectToContext, setContext, setCssClasses, setId, setPropertyReplacers, setStyle, setStyleClasses, setTemplate, setTemplateName |
Methods inherited from class org.kuali.rice.krad.uif.component.ConfigurableBase |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
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.uif.layout.LayoutManager |
---|
addStyleClass, appendToStyle, getContext, getCssClasses, getId, getPropertiesForReferenceCopy, getPropertyReplacers, getStyle, getTemplate, performFinalize, pushObjectToContext, setContext, setCssClasses, setId, setPropertyReplacers, setStyle, setTemplate |
Methods inherited from interface org.kuali.rice.krad.uif.component.Configurable |
---|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph |
Constructor Detail |
---|
public StackedLayoutManager()
Method Detail |
---|
public void performInitialization(View view, Object model, Container container)
performInitialization
in interface LayoutManager
performInitialization
in class LayoutManagerBase
view
- - View instance the layout manager is a part ofmodel
- - the object instance containing the view datacontainer
- - Container the layout manager applies toBoxLayoutManager.performInitialization(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.container.Container)
public void performApplyModel(View view, Object model, Container container)
performApplyModel
in interface LayoutManager
performApplyModel
in class LayoutManagerBase
view
- - view instance to which the layout manager belongsmodel
- - Top level object containing the data (could be the form or a
top level business object, dto)container
- - Container the layout manager applies toLayoutManagerBase.performApplyModel(org.kuali.rice.krad.uif.view.View,
java.lang.Object, org.kuali.rice.krad.uif.container.Container)
public void buildLine(View view, Object model, CollectionGroup collectionGroup, List<Field> lineFields, List<FieldGroup> subCollectionFields, String bindingPath, List<Action> actions, String idSuffix, Object currentLine, int lineIndex)
Group
instance for a collection line. The group is
built by first creating a copy of the configured prototype. Then the
header for the group is created using the configured summary fields on
the CollectionGroup
. The line fields passed in are set as
the items for the group, and finally the actions are placed into the
group footer
buildLine
in interface CollectionLayoutManager
view
- - view instance the collection belongs tomodel
- - object containing the datacollectionGroup
- - collection group the layout manager applies tolineFields
- - the field instances for the collection line which were
copied from the collection groups items, id and binding
already updatedsubCollectionFields
- - group field instances for each sub collection of the current
linebindingPath
- - binding path for the groups items (if DataBinding)actions
- - list of action instances for the collection line, with id
and binding updatedidSuffix
- - suffix to use for any generated itemscurrentLine
- - object instance for the current line, or null if add linelineIndex
- - index of the collection line being iterated over, or -1 if
the add lineCollectionLayoutManager.buildLine(org.kuali.rice.krad.uif.view.View,
Object, org.kuali.rice.krad.uif.container.CollectionGroup,
java.util.List, java.util.List, String, java.util.List,
String, Object, int)
protected 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 Class<? extends Container> getSupportedContainer()
LayoutManagerBase
getSupportedContainer
in interface LayoutManager
getSupportedContainer
in class LayoutManagerBase
LayoutManager.getSupportedContainer()
public List<Component> getComponentsForLifecycle()
LayoutManager
Used by ViewHelperService
for the various lifecycle
callbacks
getComponentsForLifecycle
in interface LayoutManager
getComponentsForLifecycle
in class LayoutManagerBase
LayoutManagerBase.getComponentsForLifecycle()
public List<Component> getComponentPrototypes()
LayoutManager
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 LayoutManager
getComponentPrototypes
in class LayoutManagerBase
LayoutManager.getComponentPrototypes()
public String getSummaryTitle()
getSummaryFields()
to build up the final header
text
public void setSummaryTitle(String summaryTitle)
summaryTitle
- public List<String> getSummaryFields()
buildLineHeaderText(Object, org.kuali.rice.krad.uif.container.Group)
public void setSummaryFields(List<String> summaryFields)
summaryFields
- 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()
public void setAddLineGroup(Group addLineGroup)
addLineGroup
- public Group getLineGroupPrototype()
public void setLineGroupPrototype(Group lineGroupPrototype)
lineGroupPrototype
- public FieldGroup getSubCollectionFieldGroupPrototype()
CollectionLayoutManager
getSubCollectionFieldGroupPrototype
in interface CollectionLayoutManager
CollectionLayoutManager.getSubCollectionFieldGroupPrototype()
public void setSubCollectionFieldGroupPrototype(FieldGroup subCollectionFieldGroupPrototype)
subCollectionFieldGroupPrototype
- 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()
public void setSelectFieldPrototype(Field selectFieldPrototype)
selectFieldPrototype
- 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.
public void setWrapperGroup(Group wrapperGroup)
wrapperGroup
- public List<Group> getStackedGroups()
List
of Groups to render for the collection
public void setStackedGroups(List<Group> stackedGroups)
stackedGroups
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |