com.infragistics.faces.grid.component.html
Class HtmlGridView

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.infragistics.faces.shared.component.DataRepeater
              extended bycom.infragistics.faces.shared.component.DataList
                  extended bycom.infragistics.faces.grid.component.GridView
                      extended bycom.infragistics.faces.grid.component.html.HtmlGridView
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class HtmlGridView
extends GridView

GridView is a very versatile and powerful component for displaying tabular data. It provides support for advanced features, such as:

Automatic Paging
The GridView component automatically handles paging through rows of data. To Enable automatic paging, simply set the pageSize property.

Automatic Sorting
The GridView component automatically provides support for sorting through columns. To Enable automatic sorting, simply set the sortBy property of the column(s) you want to sort-on.

Smart-Refresh (Built-in AJAX Support)
GridView leverages our unique Smart-Refresh technology to provide an unprecedented level of user-interaction, only available in desktop applications.
For instance, displaying a different page of data or sorting the grid, is actually done behind the scene as an AJAX request, considerably decreasing traffic over the wire and increasing the overall application performance.

Smart-DataBinding
GridView leverages our unique Smart-DataBinding technology which improves performance and bind the grid component to the underlying dataModel only when it's necessary and not on each request, as it's the case with default JSF components.

Bound and unbound mode
GridView supports both bound and unbound mode. In unbound mode, rowItems are either created declaratively (in a JSP page) or added programmatically.
In bound mode (whenever the dataSource property points to a valid data model of a backing bean) row items are automatically created by GridView, one node for each row of the data model.

Customizable Look and Feel
Background, color, border, font attributes and much more can be customized and applied to the whole grid or specific elements.

The table below summarizes which elements can be customized:

Style applied to How to customize it ?
GridView Using setStyle(String) and/or setStyleClass(String).
Grid Header and/or Footer Using setHeaderStyleClass(String) and/or setFooterStyleClass(String).
Columns Using {setColumnStyleClass(String).
Rows Using setRowStyleClass(String) and/or setRowAlternateStyleClass(String).

Facets

The following facets can be nested inside the component:
Facet Name Description
bottomPager Specifies the bottom pager to use
footer Specifies the grid footer
header Specifies the grid header
topPager Specifies the top pager to use


Events


GridView fires the following events:

Tag

1) Declare the taglib in the JSP page:
<%@ taglib prefix="ig" uri="http://www.infragistics.com/faces/netadvantage" %>

2) Use the tag as follow:
 <infragistics:gridView
	binding = EL expression
	bottomPagerEnabled = [true || false]
	dataKeyName = String
	dataSource = EL expression
	id = String
	columnFooterStyleClass = the name of a Css class
	columnHeaderStyleClass = the name of a Css class
	columnStyleClass = the name of a Css class
	footerStyleClass = the name of a Css class
	headerStyleClass = the name of a Css class
	pageChangeListener = method binding expression
	rowAlternateStyleClass = the name of a Css class
  rowSelectionMode = [single || multiple]
	rowStyleClass = the name of a Css class
	sortListener = method binding expression
	style = a Css style
	styleClass = the name of a Css class
	pageSize = Integer
	rendered = [true || false]
	topPagerEnabled = [true || false]
 >
	<-- Nested Component Tags -->
	<infragistics:rowItem ... />

	<-- Nested Facets - Optional -->
 	<f:facet name="bottomPager">
		<infragistics:pager ... />
 	</f:facet>
 	<f:facet name="footer">
		<a ui component ... />
 	</f:facet>
 	<f:facet name="header">
		<a ui component ... />
 	</f:facet>
 	<f:facet name="topPager">
		<infragistics:pager ... />
 	</f:facet>

 </infragistics:gridView>
 


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String RENDERER_TYPE
           
 
Fields inherited from class com.infragistics.faces.grid.component.GridView
FACET_BOTTOM_PAGER, FACET_FOOTER, FACET_HEADER, FACET_TOP_PAGER, ROW_SELECTION_MULTIPLE, ROW_SELECTION_SINGLE
 
Fields inherited from class com.infragistics.faces.shared.component.DataRepeater
DATA_ROW
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
HtmlGridView()
           
 
Method Summary
 java.lang.String getColumnFooterStyleClass()
          Returns the name of the css class applied to columns footer
 java.lang.String getColumnHeaderStyleClass()
          Returns the name of the css class applied to columns header
 java.lang.String getColumnStyleClass()
          Returns the name of the css class applied to columns
 java.lang.String getFamily()
           
 java.lang.String getFooterStyleClass()
          Returns the name of the css class applied to the grid footer
 java.lang.String getHeaderStyleClass()
          Returns the name of the cs class applied to the grid header
 java.lang.String getRowAlternateStyleClass()
          Returns the name of the css class applied to alternate rows
 java.lang.String getRowHoverStyleClass()
          Returns the name of a css class applied to a row when the mouse is over it
 java.lang.String getRowSelectedStyleClass()
          Returns the name of the css class applied to selected rows
 java.lang.String getRowStyleClass()
          Returns the name of the css class applied to rows
 java.lang.String getStyle()
          Returns the default Style applied to the component
 java.lang.String getStyleClass()
          Returns the name of the css class applied to the component
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setColumnFooterStyleClass(java.lang.String columnFooterStyleClass)
          Sets the name of the css class applied to columns footer
 void setColumnHeaderStyleClass(java.lang.String columnHeaderStyleClass)
          Sets the name of the css class applied to columns header
 void setColumnStyleClass(java.lang.String columnStyleClass)
          Sets the name of the css class applied to columns
 void setFooterStyleClass(java.lang.String footerStyleClass)
          Sets the name of the css class applied to the grid footer
 void setHeaderStyleClass(java.lang.String headerStyleClass)
          Sets the name of the cs class applied to the grid header
 void setRowAlternateStyleClass(java.lang.String cssClass)
          Sets the name of the css class applied to alternate rows
 void setRowHoverStyleClass(java.lang.String rowHoverStyleClass)
          Sets the name of a css class applied to a row when the mouse is over it
 void setRowSelectedStyleClass(java.lang.String styleClass)
          Sets the name of the css class applied to selected rows
 void setRowStyleClass(java.lang.String rowStyleClass)
          Sets the name of the css class applied to rows
 void setStyle(java.lang.String style)
          Sets the default Style applied to the component
 void setStyleClass(java.lang.String cssClass)
          Sets the name of the css class applied to the component
 
Methods inherited from class com.infragistics.faces.grid.component.GridView
addSelectedRowsChangeListener, broadcast, getBottomPager, getColumns, getFixedColumnCount, getFooter, getHeader, getRowItem, getRows, getSelectedRows, getSelectedRowsChangeListener, getSelectedRowsChangeListeners, getTopPager, isBottomPagerRendered, isTopPagerRendered, processDecodes, removeSelectedRowsChangeListener, setBottomPager, setBottomPagerRendered, setFixedColumnCount, setFooter, setHeader, setSelectedRowsChangeListener, setTopPager, setTopPagerRendered
 
Methods inherited from class com.infragistics.faces.shared.component.DataList
addPageChangeListener, addSortListener, firePageChangeEvent, fireSortEvent, getItemCount, getPageChangeListener, getPageChangeListeners, getPageCount, getPageIndex, getPageSize, getSortExpressionIndex, getSortExpressions, getSortListener, getSortListeners, isCustomPagingEnabled, isCustomSortingEnabled, removePageChangeListener, removeSortListener, setCustomPagingEnabled, setCustomSortingEnabled, setItemCount, setPageChangeListener, setPageIndex, setPageSize, setSortExpressions, setSortListener
 
Methods inherited from class com.infragistics.faces.shared.component.DataRepeater
dataBind, encodeBegin, encodeEnd, getDataKeyName, getDataKeyValue, getDataSource, getTemplateItems, processUpdates, processValidators, queueEvent, setDataKeyName, setDataSource, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponentBase
decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static java.lang.String COMPONENT_FAMILY

COMPONENT_TYPE

public static java.lang.String COMPONENT_TYPE

RENDERER_TYPE

public static java.lang.String RENDERER_TYPE
Constructor Detail

HtmlGridView

public HtmlGridView()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class GridView

getColumnFooterStyleClass

public java.lang.String getColumnFooterStyleClass()
Returns the name of the css class applied to columns footer

Returns:
Returns the columnFooterStyleClass.

getColumnHeaderStyleClass

public java.lang.String getColumnHeaderStyleClass()
Returns the name of the css class applied to columns header

Returns:
Returns the columStyleClass.

getColumnStyleClass

public java.lang.String getColumnStyleClass()
Returns the name of the css class applied to columns

Returns:
Returns the columStyleClass.

getFooterStyleClass

public java.lang.String getFooterStyleClass()
Returns the name of the css class applied to the grid footer

Returns:
Returns the footerStyleClass.

getHeaderStyleClass

public java.lang.String getHeaderStyleClass()
Returns the name of the cs class applied to the grid header

Returns:
Returns the headerStyleClass.

getRowAlternateStyleClass

public java.lang.String getRowAlternateStyleClass()
Returns the name of the css class applied to alternate rows

Returns:
the rowAlternateStyleClass

getRowHoverStyleClass

public java.lang.String getRowHoverStyleClass()
Returns the name of a css class applied to a row when the mouse is over it

Returns:
a CSS style

getRowSelectedStyleClass

public java.lang.String getRowSelectedStyleClass()
Returns the name of the css class applied to selected rows

Returns:
style

getRowStyleClass

public java.lang.String getRowStyleClass()
Returns the name of the css class applied to rows

Returns:
the rowStyleClass

getStyle

public java.lang.String getStyle()
Returns the default Style applied to the component

Returns:
the Style

getStyleClass

public java.lang.String getStyleClass()
Returns the name of the css class applied to the component

Returns:
the StyleClass

setColumnFooterStyleClass

public void setColumnFooterStyleClass(java.lang.String columnFooterStyleClass)
Sets the name of the css class applied to columns footer

Parameters:
columnFooterStyleClass - The columnFooterStyleClass to set.

setColumnHeaderStyleClass

public void setColumnHeaderStyleClass(java.lang.String columnHeaderStyleClass)
Sets the name of the css class applied to columns header

Parameters:
columnHeaderStyleClass - The columHeaderStyleClass to set.

setColumnStyleClass

public void setColumnStyleClass(java.lang.String columnStyleClass)
Sets the name of the css class applied to columns

Parameters:
columnStyleClass - The columStyleClass to set.

setFooterStyleClass

public void setFooterStyleClass(java.lang.String footerStyleClass)
Sets the name of the css class applied to the grid footer

Parameters:
footerStyleClass - The footerStyleClass to set.

setHeaderStyleClass

public void setHeaderStyleClass(java.lang.String headerStyleClass)
Sets the name of the cs class applied to the grid header

Parameters:
headerStyleClass - The headerStyleClass to set.

setRowAlternateStyleClass

public void setRowAlternateStyleClass(java.lang.String cssClass)
Sets the name of the css class applied to alternate rows

Parameters:
cssClass - The new value to set

setRowHoverStyleClass

public void setRowHoverStyleClass(java.lang.String rowHoverStyleClass)
Sets the name of a css class applied to a row when the mouse is over it

Parameters:
rowHoverStyleClass -

setRowSelectedStyleClass

public void setRowSelectedStyleClass(java.lang.String styleClass)
Sets the name of the css class applied to selected rows

Returns:
String

setRowStyleClass

public void setRowStyleClass(java.lang.String rowStyleClass)
Sets the name of the css class applied to rows

Parameters:
rowStyleClass - The new value to set

setStyle

public void setStyle(java.lang.String style)
Sets the default Style applied to the component

Parameters:
style -

setStyleClass

public void setStyleClass(java.lang.String cssClass)
Sets the name of the css class applied to the component

Parameters:
cssClass -

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class GridView
See Also:
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class GridView
See Also:
StateHolder.saveState(javax.faces.context.FacesContext)