| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.uif.component.ConfigurableBase
org.kuali.rice.krad.uif.layout.LayoutManagerBase
org.kuali.rice.krad.uif.layout.GridLayoutManager
org.kuali.rice.krad.uif.layout.TableLayoutManager
public class TableLayoutManager
Layout manager that works with CollectionGroup components and
 renders the collection as a Table
 
 Based on the fields defined, the TableLayoutManager will
 dynamically create instances of the fields for each collection row. In
 addition, the manager can create standard fields like the action and sequence
 fields for each row. The manager supports options inherited from the
 GridLayoutManager such as rowSpan, colSpan, and cell width
 settings.
 
| Constructor Summary | |
|---|---|
| TableLayoutManager() | |
| Method Summary | |
|---|---|
| protected  void | addHeaderField(Field field,
                             int column)Creates a new instance of the header field prototype and then sets the label to the short (if useShortLabels is set to true) or long label of the given component. | 
|  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)Assembles the field instances for the collection line. | 
| protected  void | buildTableHeaderRows(CollectionGroup collectionGroup,
                                         List<Field> lineFields)Create the Labelinstances that will be used to render
 the table header | 
| protected  int | calculateNumberOfRows(List<? extends Field> items)Calculates how many rows will be needed per collection line to display the list of fields. | 
|  int | getActionColumnIndex()Indicates the index of the action column | 
|  String | getActionColumnPlacement()Indicates the actions column placement | 
|  FieldGroup | getActionFieldPrototype()FieldGroupinstance to serve as a prototype for the actions
 column. | 
|  Group | getAddLineGroup()When isSeparateAddLine()is true, this group will be used to render 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 | 
|  List<Component> | getDataFields()List of Componentinstances that make up the tables body. | 
|  Label | getHeaderLabelPrototype()Labelinstance to use as a prototype for creating the
 tables header fields. | 
|  List<Label> | getHeaderLabels()List of Labelinstances that should be rendered to make
 up the tables header | 
|  Set<String> | getHiddenColumns() | 
|  int | getNumberOfDataColumns() | 
|  RichTable | getRichTable()Widget associated with the table to add functionality such as sorting, paging, and export | 
|  Group | getRowDetailsGroup()The row details info group to use when using a TableLayoutManager with the a richTable. | 
|  String | getRowDetailsLinkName()Name of the link for displaying row details in a TableLayoutManager CollectionGroup | 
|  Field | getSelectFieldPrototype()Field instance that serves as a prototype for creating the select field on each line when CollectionGroup.isIncludeLineSelectionField()is true | 
|  Field | getSequenceFieldPrototype()Fieldinstance to serve as a prototype for the
 sequence field. | 
|  String | getSequencePropertyName()Attribute name to use as sequence value. | 
|  Set<String> | getSortableColumns() | 
|  FieldGroup | getSubCollectionFieldGroupPrototype()Field group instance that is used as a prototype for creating the sub-collection field groups. | 
|  Class<? extends Container> | getSupportedContainer()Default Impl | 
|  boolean | isGenerateAutoSequence()Indicates whether the sequence field should be generated with the current line number | 
|  boolean | isRenderSequenceField()Indicates whether the sequence field should be rendered for the collection | 
|  boolean | isRepeatHeader()Indicates whether the header should be repeated before each collection row. | 
|  boolean | isRowDetailsUseImage()If true, the row details link will use an image instead of a link to display row details in a TableLayoutManager CollectionGroup | 
|  boolean | isSeparateAddLine()Indicates whether the add line should be rendered in a separate group, or as part of the table (first line) | 
|  boolean | isUseShortLabels()Indicates whether the short label for the collection field should be used as the table header or the regular label | 
|  void | performFinalize(View view,
                               Object model,
                               Container container)Sets up the final column count for rendering based on whether the sequence and action fields have been generated | 
|  void | performInitialization(View view,
                                           Object model,
                                           Container container)The following actions are performed: Sets sequence field prototype if auto sequence is true Initializes the prototypes | 
|  void | setActionColumnPlacement(String actionColumnPlacement)Setter for the action column placement | 
|  void | setActionFieldPrototype(FieldGroup actionFieldPrototype)Setter for the action field prototype | 
|  void | setAddLineGroup(Group addLineGroup)Setter for the add line Group | 
|  void | setGenerateAutoSequence(boolean generateAutoSequence)Setter for the generate auto sequence field | 
|  void | setHeaderLabelPrototype(Label headerLabelPrototype)Setter for the header field prototype | 
|  void | setHiddenColumns(Set<String> hiddenColumns) | 
|  void | setNumberOfDataColumns(int numberOfDataColumns) | 
|  void | setRenderSequenceField(boolean renderSequenceField)Setter for the render sequence field indicator | 
|  void | setRepeatHeader(boolean repeatHeader)Setter for the repeat header indicator | 
|  void | setRichTable(RichTable richTable)Setter for the rich table widget | 
|  void | setRowDetailsGroup(Group rowDetailsGroup)Set the row details info group | 
|  void | setRowDetailsLinkName(String rowDetailsLinkName)Row details link name | 
|  void | setRowDetailsUseImage(boolean rowDetailsUseImage)Sets row details link use image flag | 
|  void | setSelectFieldPrototype(Field selectFieldPrototype)Setter for the prototype instance for select fields | 
|  void | setSeparateAddLine(boolean separateAddLine)Setter for the separate add line indicator | 
|  void | setSequenceFieldPrototype(Field sequenceFieldPrototype)Setter for the sequence field prototype | 
|  void | setSequencePropertyName(String sequencePropertyName)Setter for the sequence property name | 
|  void | setSortableColumns(Set<String> sortableColumns) | 
|  void | setSubCollectionFieldGroupPrototype(FieldGroup subCollectionFieldGroupPrototype)Setter for the sub-collection field group prototype | 
|  void | setupDetails(CollectionGroup collectionGroup,
                         View view)Creates the details group for the line using the information setup through the setter methods of this interface. | 
|  void | setUseShortLabels(boolean useShortLabels)Setter for the use short label indicator | 
| Methods inherited from class org.kuali.rice.krad.uif.layout.LayoutManagerBase | 
|---|
| addStyleClass, appendToStyle, getContext, getCssClasses, getId, getPropertiesForReferenceCopy, getPropertyReplacers, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, performApplyModel, 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, performApplyModel, 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 TableLayoutManager()
| Method Detail | 
|---|
public void performInitialization(View view,
                                  Object model,
                                  Container container)
performInitialization in interface LayoutManagerperformInitialization in class LayoutManagerBaseview - - 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 performFinalize(View view,
                            Object model,
                            Container container)
performFinalize in interface LayoutManagerperformFinalize in class GridLayoutManagerview - - view instance that should be finalized for renderingmodel - - top level object containing the datacontainer - - Container the layout manager applies toLayoutManagerBase.performFinalize(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)
buildLine in interface CollectionLayoutManagerview - - 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,
      java.lang.Object, org.kuali.rice.krad.uif.container.CollectionGroup,
      java.util.List, java.util.List, java.lang.String, java.util.List,
      java.lang.String, java.lang.Object, int)
protected void buildTableHeaderRows(CollectionGroup collectionGroup,
                                    List<Field> lineFields)
Label instances that will be used to render
 the table header
 For each column, a copy of headerLabelPrototype is made that determines the label configuration. The actual label text comes from the field for which the header applies to. The first column is always the sequence (if enabled) and the last column contains the actions. Both the sequence and action header fields will span all rows for the header.
The headerLabels list will contain the final list of header fields built
collectionGroup - - CollectionGroup container the table applies tolineFields - - fields for the data columns from which the headers are pulled
protected void addHeaderField(Field field,
                              int column)
field - - field instance the header field is being created forcolumn - - column number for the header, used for setting the idprotected int calculateNumberOfRows(List<? extends Field> items)
items - - list of items that make up one collection line
public Class<? extends Container> getSupportedContainer()
LayoutManagerBase
getSupportedContainer in interface LayoutManagergetSupportedContainer in class GridLayoutManagerLayoutManager.getSupportedContainer()public List<Component> getComponentsForLifecycle()
LayoutManager
 Used by ViewHelperService for the various lifecycle
 callbacks
 
getComponentsForLifecycle in interface LayoutManagergetComponentsForLifecycle in class LayoutManagerBaseLayoutManagerBase.getComponentsForLifecycle()public List<Component> getComponentPrototypes()
LayoutManagerPrototypes 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 LayoutManagergetComponentPrototypes in class LayoutManagerBaseLayoutManager.getComponentPrototypes()public boolean isUseShortLabels()
public void setUseShortLabels(boolean useShortLabels)
useShortLabels - public boolean isRepeatHeader()
public void setRepeatHeader(boolean repeatHeader)
repeatHeader - public Label getHeaderLabelPrototype()
Label instance to use as a prototype for creating the
 tables header fields. For each header field the prototype will be copied
 and adjusted as necessary
public void setHeaderLabelPrototype(Label headerLabelPrototype)
headerLabelPrototype - public List<Label> getHeaderLabels()
Label instances that should be rendered to make
 up the tables header
public boolean isRenderSequenceField()
public void setRenderSequenceField(boolean renderSequenceField)
renderSequenceField - public String getSequencePropertyName()
public void setSequencePropertyName(String sequencePropertyName)
sequencePropertyName - public boolean isGenerateAutoSequence()
If set to true the sequence field prototype will be changed to a message field (if not already a message field) and the text will be set to the current line number
public void setGenerateAutoSequence(boolean generateAutoSequence)
generateAutoSequence - public Field getSequenceFieldPrototype()
Field instance to serve as a prototype for the
 sequence field. For each collection line this instance is copied and
 adjusted as necessary
public void setSequenceFieldPrototype(Field sequenceFieldPrototype)
sequenceFieldPrototype - public FieldGroup getActionFieldPrototype()
FieldGroup instance to serve as a prototype for the actions
 column. For each collection line this instance is copied and adjusted as
 necessary. Note the actual actions for the group come from the collection
 groups actions List
 (org.kuali.rice.krad.uif.container.CollectionGroup.getActions()). The
 FieldGroup prototype is useful for setting styling of the actions column
 and for the layout of the action fields. Note also the label associated
 with the prototype is used for the action column header
public void setActionFieldPrototype(FieldGroup actionFieldPrototype)
actionFieldPrototype - public FieldGroup getSubCollectionFieldGroupPrototype()
CollectionLayoutManager
getSubCollectionFieldGroupPrototype in interface CollectionLayoutManagerCollectionLayoutManager.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 boolean isSeparateAddLine()
 When separate add line is enabled, the fields for the add line will be placed in the getAddLineGroup().
 This group can be used to configure the add line presentation. In addition to the fields, the header on the
 group (unless already set) will be set to
 CollectionGroup.getAddLabel() and the add line actions will
 be placed into the group's footer.
 
public void setSeparateAddLine(boolean separateAddLine)
separateAddLine - public Group getAddLineGroup()
isSeparateAddLine() is true, this group will be used to render the add line
 
 This group can be used to configure how the add line will be rendered. For example the layout manager configured
 on the group will be used to rendered the add line fields. If the header (title) is not set on the group, it
 will be set from
 CollectionGroup.getAddLabel(). In addition,
 CollectionGroup.getAddLineActions() will be added to the group
 footer items.
 
public void setAddLineGroup(Group addLineGroup)
addLineGroup - public List<Component> getDataFields()
Component instances that make up the tables body. Pulled
 by the layout manager template to send through the Grid layout
public RichTable getRichTable()
public void setRichTable(RichTable richTable)
richTable - public int getNumberOfDataColumns()
public void setNumberOfDataColumns(int numberOfDataColumns)
numberOfDataColumns - the numberOfDataColumns to setpublic Set<String> getHiddenColumns()
RichTable.getHiddenColumns()public void setHiddenColumns(Set<String> hiddenColumns)
org.kuali.rice.krad.uif.widget.RichTable#setHiddenColumns(java.util.Set) public Set<String> getSortableColumns()
RichTable.getSortableColumns()public void setSortableColumns(Set<String> sortableColumns)
org.kuali.rice.krad.uif.widget.RichTable#setSortableColumns(java.util.Set) public int getActionColumnIndex()
public String getActionColumnPlacement()
Valid values are 'LEFT', 'RIGHT' or any valid number. The default is 'RIGHT' or '-1'. The column placement index takes all displayed columns, including sequence and selection columns, into account.
public void setActionColumnPlacement(String actionColumnPlacement)
actionColumnPlacement - - action column placement stringpublic Group getRowDetailsGroup()
This group will be displayed when the user clicks the "Details" link/image on a row. This allows extra/long data to be hidden in table rows and then revealed during interaction with the table without the need to leave the page. Allows for any group content.
Does not currently work with javascript required content.
public void setRowDetailsGroup(Group rowDetailsGroup)
rowDetailsGroup - row details grouppublic String getRowDetailsLinkName()
public void setRowDetailsLinkName(String rowDetailsLinkName)
rowDetailsLinkName - name of the details linkpublic boolean isRowDetailsUseImage()
public void setRowDetailsUseImage(boolean rowDetailsUseImage)
rowDetailsUseImage - true to use image for details, false otherwise
public void setupDetails(CollectionGroup collectionGroup,
                         View view)
collectionGroup - the CollectionGroup for this TableLayoutManagerview - the current view| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||