org.kuali.rice.krad.uif.layout
Interface CollectionLayoutManager

All Superinterfaces:
DictionaryBean, LayoutManager, Serializable, UifDictionaryBean
All Known Implementing Classes:
StackedLayoutManager, TableLayoutManager

public interface CollectionLayoutManager
extends LayoutManager

Layout manager implementations that work with a collection (such as a table layout) should implement this interface for building the collection Component instances

Unlike other Group instances, CollectionGroup instances need to generate new instances of the configured components for each line of the collection. The Field instances for each line are wrapped differently depending on what LayoutManager is being applied. Therefore as the collection lines are being built (during the applyModel phase) this method will be invoked on the manager so that it may setup the line as needed.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
CollectionGroupBuilder

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)
          Call to the layout manager to build the components necessary for the given collection line
 FieldGroup getSubCollectionFieldGroupPrototype()
          Field group instance that is used as a prototype for creating the sub-collection field groups.
 
Methods inherited from interface org.kuali.rice.krad.uif.layout.LayoutManager
addStyleClass, appendToStyle, copy, getComponentPrototypes, getComponentsForLifecycle, getContext, getCssClasses, getId, getPropertyReplacers, getStyle, getSupportedContainer, getTemplate, getTemplateName, performApplyModel, performFinalize, performInitialization, pushObjectToContext, setContext, setCssClasses, setId, setPropertyReplacers, setStyle, setTemplate, setTemplateName
 
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
 

Method Detail

buildLine

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)
Call to the layout manager to build the components necessary for the given collection line

As the collection is being iterated over by the CollectionGroupBuilder 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

Parameters:
view - - view instance the collection belongs to
model - - object containing the data
collectionGroup - - collection group the layout manager applies to
lineFields - - the field instances for the collection line which were copied from the collection groups items, id and binding already updated
subCollectionFields - - group field instances for each sub collection of the current line
bindingPath - - binding path for the groups items (if DataBinding)
actions - - list of action instances for the collection line, with id and binding updated
idSuffix - - suffix to use for any generated items
currentLine - - object instance for the current line, or null if add line
lineIndex - - index of the collection line being iterated over, or -1 if the add line

getSubCollectionFieldGroupPrototype

FieldGroup getSubCollectionFieldGroupPrototype()
Field group instance that is used as a prototype for creating the sub-collection field groups. For each sub-collection a copy of the prototype is made and the list will be passed to the layout manager buildLine method

Returns:
GroupField instance to use as prototype


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.