org.apache.myfaces.component.html.ext
Class AbstractHtmlDataTable

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIData
              extended by javax.faces.component.html.HtmlDataTable
                  extended by org.apache.myfaces.component.html.ext.HtmlDataTableHack
                      extended by org.apache.myfaces.component.html.ext.AbstractHtmlDataTable
All Implemented Interfaces:
EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, org.apache.myfaces.component.NewspaperTable, org.apache.myfaces.component.UserRoleAware, org.apache.myfaces.custom.ExtendedComponentBase

@JSFComponent(name="t:dataTable",
              clazz="org.apache.myfaces.component.html.ext.HtmlDataTable",
              tagClass="org.apache.myfaces.generated.taglib.html.ext.HtmlDataTableTag",
              tagHandler="org.apache.myfaces.component.html.ext.HtmlDataTableTagHandler")
public abstract class AbstractHtmlDataTable
extends HtmlDataTableHack
implements org.apache.myfaces.component.UserRoleAware, org.apache.myfaces.component.NewspaperTable

The MyFacesDataTable extends the standard JSF DataTable by two important features:


Extended data_table that adds some additional features to the standard data_table action: see attribute descriptions for preserveDataModel, sortColumn, sortAscending and preserveSort.
Unless otherwise specified, all attributes accept static values or EL expressions.

Since:
1.1.7
Version:
$Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (miƩ, 03 sep 2008) $
Author:
Thomas Spiegl (latest modification by $Author: lu4242 $), Manfred Geiler

Nested Class Summary
protected static class AbstractHtmlDataTable.PropertyKeys
           
 
Field Summary
static String COMPONENT_TYPE
           
static String DEFAULT_RENDERER_TYPE
           
static String DETAIL_STAMP_FACET_NAME
           
static String DETAIL_STAMP_ROW_FACET_NAME
           
static String NEWSPAPER_COLUMNS_PROPERTY
          the property names
static String NEWSPAPER_ORIENTATION_PROPERTY
           
static String SPACER_FACET_NAME
           
static String TABLE_ROW_FACET_NAME
           
 
Fields inherited from class javax.faces.component.html.HtmlDataTable
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Fields inherited from interface org.apache.myfaces.component.UserRoleAware
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR
 
Fields inherited from interface org.apache.myfaces.component.NewspaperTable
NEWSPAPER_HORIZONTAL_ORIENTATION
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
AbstractHtmlDataTable()
           
 
Method Summary
 void collapseAllDetails()
          Collapse all details
protected  int columnNameToIndex(String columnName)
           
protected  javax.faces.model.DataModel createDataModel()
          Creates a new DataModel around the current value.
protected  org.apache.myfaces.custom.sortheader.HtmlCommandSortHeader createSortHeaderComponent(javax.faces.context.FacesContext context, javax.faces.component.UIColumn parentColumn, javax.faces.component.UIComponent initialHeaderFacet, String propertyName)
           
 void encodeBegin(javax.faces.context.FacesContext context)
           
 void encodeEnd(javax.faces.context.FacesContext context)
           
 void expandAllDetails()
          Expand all details
 javax.faces.component.UIComponent findComponent(String expr)
           
abstract  String getAlign()
          HTML: Specifies the horizontal alignment of this element.
abstract  String getBodyStyle()
          Corresponds to the HTML style attribute for the table body tag
abstract  String getBodyStyleClass()
          Corresponds to the HTML class attribute for the table body tag.
 String getContainerClientId(javax.faces.context.FacesContext context)
           
abstract  String getDatafld()
          Reserved for future use.
abstract  String getDataformatas()
          Reserved for future use.
protected  javax.faces.model.DataModel getDataModel()
           
abstract  String getDatasrc()
          Reserved for future use.
 javax.faces.component.UIComponent getDetailStamp()
          This facet renders an additional row after or before (according to detailStampLocation value) the current row, usually containing additional information of the related row.
abstract  String getDetailStampLocation()
          before|after - where to render the detailStamp, before the actual row or after it.
 int getFirst()
          The index of the first row to be displayed, where 0 is the first row.
 String getForceIdIndexFormula()
          A formula that overrides the default row index in the construction of table's body components.
abstract  int getNewspaperColumns()
          The number of columns to wrap the table over.
abstract  String getNewspaperOrientation()
          The orientation of the newspaper columns in the newspaper table - "horizontal" or "vertical".
protected  org.apache.myfaces.component.html.ext._SerializableDataModel getPreservedDataModel()
           
abstract  String getPreviousRowDataVar()
          A parameter name, under which the previous RowData Object is set in request scope similar to the rowIndexVar and rowCountVar parameters.
abstract  String getRowCountVar()
          A parameter name, under which the rowCount is set in request scope similar to the var parameter.
abstract  String getRowGroupStyle()
          Corresponds to the HTML style attribute for grouped rows.
abstract  String getRowGroupStyleClass()
          StyleClass for grouped rows.
abstract  String getRowId()
          The id to use for
abstract  String getRowIndexVar()
          A parameter name, under which the current rowIndex is set in request scope similar to the var parameter.
abstract  String getRowOnClick()
          Defines a JavaScript onclick event handler for each table row
abstract  String getRowOnDblClick()
          Defines a JavaScript ondblclick event handler for each table row
abstract  String getRowOnKeyDown()
          Defines a JavaScript onkeydown event handler for each table row
abstract  String getRowOnKeyPress()
          Defines a JavaScript onkeypress event handler for each table row
abstract  String getRowOnKeyUp()
          Defines a JavaScript onkeyup event handler for each table row
abstract  String getRowOnMouseDown()
          Defines a JavaScript onmpusedown event handler for each table row
abstract  String getRowOnMouseMove()
          Defines a JavaScript onmousemove event handler for each table row
abstract  String getRowOnMouseOut()
          Defines a JavaScript onmouseout event handler for each table row
abstract  String getRowOnMouseOver()
          Defines a JavaScript onmouseover event handler for each table row
abstract  String getRowOnMouseUp()
          Defines a JavaScript onmouseup event handler for each table row
 int getRows()
          The number of rows to be displayed.
abstract  String getRowStyle()
          Corresponds to the HTML style attribute for the row tr tag.
abstract  String getRowStyleClass()
          Corresponds to the HTML class attribute for the row tr tag.
 org.apache.myfaces.component.html.ext._SerializableDataModel getSerializableDataModel()
           
 String getSortColumn()
          Value reference to a model property that gives the current sort column name.
 int getSortColumnIndex()
           
abstract  String getSortedColumnVar()
          A parameter name, under which the a boolean is set in request scope similar to the var parameter.
abstract  String getSortProperty()
          The name of a javabean property on which the table is sorted.
protected  String getSortPropertyFromEL(javax.faces.component.UIComponent component)
           
 javax.faces.component.UIComponent getSpacer()
          Gets the spacer facet, between each pair of newspaper columns.
 org.apache.myfaces.renderkit.html.util.TableContext getTableContext()
           
abstract  String getValueType()
          Indicate the expected type of the EL expression pointed by value property.
 String getVarDetailToggler()
          This variable has the boolean property "currentdetailExpanded" which is true if the current detail row is expanded and the action method "toggleDetail" which expand/collapse the current detail row.
 boolean invokeOnComponent(javax.faces.context.FacesContext context, String clientId, javax.faces.component.ContextCallback callback)
           
abstract  boolean isAjaxRowRender()
          Indicate if "row" can be a target for an ajax render operation.
 boolean isCurrentDetailExpanded()
           
 boolean isDetailExpanded()
          Return true if the current detail row is expanded.
abstract  boolean isDetailStampExpandedDefault()
          true|false - true if the detailStamp should be expanded by default.
abstract  boolean isEmbedded()
          Avoids rendering the html table tags, thus, giving you a table rendering just rows.
 boolean isExpandedEmpty()
           
abstract  boolean isPreserveDataModel()
          Indicates whether the state of the whole DataModel should be saved and restored.
abstract  boolean isPreserveSort()
          Indicates whether the state of the sortColumn and sortAscending attribute should be saved and restored and written back to the model during the update model phase.
 boolean isRendered()
           
abstract  boolean isRenderedIfEmpty()
          Indicates whether this table should be rendered if the underlying DataModel is empty.
abstract  boolean isSortable()
          Define if the table is sortable or not
 boolean isSortAscending()
          Value reference to a model property that gives the current sort direction.
protected  boolean isSortHeaderNeeded(javax.faces.component.UIColumn parentColumn, javax.faces.component.UIComponent headerFacet)
           
protected  boolean isValidChildren()
           
 void markInitialState()
           
 void processDecodes(javax.faces.context.FacesContext context)
           
 void processUpdates(javax.faces.context.FacesContext context)
           
 void processValidators(javax.faces.context.FacesContext context)
           
protected  void restoreDescendantComponentStates(Object state)
           
protected  void restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext, Map<String,Object> rowState, Object initialState)
           
protected  void restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext, Object initialState)
           
 void restoreState(javax.faces.context.FacesContext context, Object state)
           
protected  Object saveDescendantComponentStates()
           
protected  Collection<Object[]> saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext)
           
protected  Map<String,Object> saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setDetailStamp(javax.faces.component.UIComponent facet)
           
 void setExpandedEmpty(boolean expandedEmpty)
          Clears expanded nodes set if expandedEmpty is true
 void setFirst(int first)
           
 void setForceIdIndexFormula(String forceIdIndexFormula)
           
protected  void setIsValidChildren(boolean isValidChildren)
           
protected  void setPreservedDataModel(org.apache.myfaces.component.html.ext._SerializableDataModel preservedDataModel)
           
 void setRowIndex(int rowIndex)
           
 void setRows(int rows)
           
 void setSortAscending(boolean sortAscending)
           
 void setSortColumn(String sortColumn)
          Specify what column the data should be sorted on.
 void setSortColumnIndex(int sortColumnIndex)
           
abstract  void setSortProperty(String sortProperty)
           
 void setSpacer(javax.faces.component.UIComponent spacer)
           
 void setVarDetailToggler(String varDetailToggler)
           
 void toggleDetail()
          Change the status of the current detail row from collapsed to expanded or viceversa.
 boolean visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)
           
 
Methods inherited from class org.apache.myfaces.component.html.ext.HtmlDataTableHack
checkUpdateModelError, clearRowStates, deleteRowStateForRow, getClientId, getDerivedRowKeyPrefix, getDerivedSubClientId, getRowCount, getRowData, getRowIndex, getRowKey, hasErrorMessages, isForceId, isForceIdIndex, isPreserveRowComponentState, isPreserveRowStates, isRowAvailable, isRowStatePreserved, restoreDescendantComponentStates, restoreFullDescendantComponentDeltaStates, restoreFullDescendantComponentStates, saveDescendantComponentStates, saveDescendantInitialComponentStates, saveFullDescendantComponentStates, setDataModel, setDerivedRowKeyPrefix, setForceId, setForceIdIndex, setPreserveRowComponentState, setPreserveRowStates, setRowKey, setRowStatePreserved, setValue, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.html.HtmlDataTable
addClientBehavior, getBgcolor, getBodyrows, getBorder, getCaptionClass, getCaptionStyle, getCellpadding, getCellspacing, getColumnClasses, getDir, getEventNames, getFamily, getFooterClass, getFrame, getHeaderClass, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRowClasses, getRules, getStyle, getStyleClass, getSummary, getTitle, getWidth, setBgcolor, setBodyrows, setBorder, setCaptionClass, setCaptionStyle, setCellpadding, setCellspacing, setColumnClasses, setDir, setFooterClass, setFrame, setHeaderClass, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRowClasses, setRules, setStyle, setStyleClass, setSummary, setTitle, setWidth
 
Methods inherited from class javax.faces.component.UIData
broadcast, createUniqueId, getFooter, getHeader, getValue, getVar, queueEvent, setFooter, setHeader, setVar
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, clearInitialState, decode, encodeAll, encodeChildren, getAttributes, getChildCount, getChildren, getClientBehaviors, getDefaultEventName, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.component.UserRoleAware
getEnabledOnUserRole, getVisibleOnUserRole, setEnabledOnUserRole, setVisibleOnUserRole
 
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
getClientBehaviors, getDefaultEventName
 

Field Detail

NEWSPAPER_COLUMNS_PROPERTY

public static final String NEWSPAPER_COLUMNS_PROPERTY
the property names

See Also:
Constant Field Values

SPACER_FACET_NAME

public static final String SPACER_FACET_NAME
See Also:
Constant Field Values

NEWSPAPER_ORIENTATION_PROPERTY

public static final String NEWSPAPER_ORIENTATION_PROPERTY
See Also:
Constant Field Values

DETAIL_STAMP_FACET_NAME

public static final String DETAIL_STAMP_FACET_NAME
See Also:
Constant Field Values

DETAIL_STAMP_ROW_FACET_NAME

public static final String DETAIL_STAMP_ROW_FACET_NAME
See Also:
Constant Field Values

TABLE_ROW_FACET_NAME

public static final String TABLE_ROW_FACET_NAME
See Also:
Constant Field Values

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

AbstractHtmlDataTable

public AbstractHtmlDataTable()
Method Detail

getTableContext

public org.apache.myfaces.renderkit.html.util.TableContext getTableContext()

setDetailStamp

public void setDetailStamp(javax.faces.component.UIComponent facet)

getDetailStamp

public javax.faces.component.UIComponent getDetailStamp()
This facet renders an additional row after or before (according to detailStampLocation value) the current row, usually containing additional information of the related row. It is toggled usually using varDetailToggle variable and the method toggleDetail().


getContainerClientId

public String getContainerClientId(javax.faces.context.FacesContext context)
Overrides:
getContainerClientId in class HtmlDataTableHack

findComponent

public javax.faces.component.UIComponent findComponent(String expr)
Overrides:
findComponent in class javax.faces.component.UIComponentBase

invokeOnComponent

public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                 String clientId,
                                 javax.faces.component.ContextCallback callback)
                          throws javax.faces.FacesException
Overrides:
invokeOnComponent in class javax.faces.component.UIData
Throws:
javax.faces.FacesException

visitTree

public boolean visitTree(javax.faces.component.visit.VisitContext context,
                         javax.faces.component.visit.VisitCallback callback)
Overrides:
visitTree in class javax.faces.component.UIData

setRowIndex

public void setRowIndex(int rowIndex)
Overrides:
setRowIndex in class HtmlDataTableHack

saveDescendantComponentStates

protected Object saveDescendantComponentStates()
Overrides:
saveDescendantComponentStates in class HtmlDataTableHack

restoreDescendantComponentStates

protected void restoreDescendantComponentStates(Object state)
Overrides:
restoreDescendantComponentStates in class HtmlDataTableHack

restoreFullDescendantComponentDeltaStates

protected void restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext,
                                                         Map<String,Object> rowState,
                                                         Object initialState)
Overrides:
restoreFullDescendantComponentDeltaStates in class HtmlDataTableHack

restoreFullDescendantComponentStates

protected void restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext,
                                                    Object initialState)
Overrides:
restoreFullDescendantComponentStates in class HtmlDataTableHack

saveDescendantInitialComponentStates

protected Collection<Object[]> saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext)
Overrides:
saveDescendantInitialComponentStates in class HtmlDataTableHack

saveFullDescendantComponentStates

protected Map<String,Object> saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext)
Overrides:
saveFullDescendantComponentStates in class HtmlDataTableHack

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Overrides:
processDecodes in class javax.faces.component.UIData

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Overrides:
processValidators in class HtmlDataTableHack
See Also:
UIData.processValidators(javax.faces.context.FacesContext)

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Overrides:
processUpdates in class HtmlDataTableHack
See Also:
UIData.processUpdates(javax.faces.context.FacesContext)

markInitialState

public void markInitialState()
Specified by:
markInitialState in interface javax.faces.component.PartialStateHolder
Overrides:
markInitialState in class HtmlDataTableHack

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws IOException
Overrides:
encodeBegin in class HtmlDataTableHack
Throws:
IOException
See Also:
UIData.encodeBegin(javax.faces.context.FacesContext)

isSortHeaderNeeded

protected boolean isSortHeaderNeeded(javax.faces.component.UIColumn parentColumn,
                                     javax.faces.component.UIComponent headerFacet)

createSortHeaderComponent

protected org.apache.myfaces.custom.sortheader.HtmlCommandSortHeader createSortHeaderComponent(javax.faces.context.FacesContext context,
                                                                                               javax.faces.component.UIColumn parentColumn,
                                                                                               javax.faces.component.UIComponent initialHeaderFacet,
                                                                                               String propertyName)

getSortPropertyFromEL

protected String getSortPropertyFromEL(javax.faces.component.UIComponent component)

columnNameToIndex

protected int columnNameToIndex(String columnName)
Returns:
the index coresponding to the given column name.

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws IOException
Overrides:
encodeEnd in class HtmlDataTableHack
Throws:
IOException
See Also:
UIData.encodeEnd(javax.faces.context.FacesContext)

getFirst

@JSFProperty
public int getFirst()
The index of the first row to be displayed, where 0 is the first row.

Overrides:
getFirst in class javax.faces.component.UIData

setFirst

public void setFirst(int first)
Overrides:
setFirst in class javax.faces.component.UIData

getRows

@JSFProperty
public int getRows()
The number of rows to be displayed. Specify zero for all remaining rows in the table.

Overrides:
getRows in class javax.faces.component.UIData

setRows

public void setRows(int rows)
Overrides:
setRows in class javax.faces.component.UIData

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class HtmlDataTableHack

getDataModel

protected javax.faces.model.DataModel getDataModel()
Overrides:
getDataModel in class HtmlDataTableHack
See Also:
HtmlDataTableHack.getDataModel()

createDataModel

protected javax.faces.model.DataModel createDataModel()
Description copied from class: HtmlDataTableHack
Creates a new DataModel around the current value.

Overrides:
createDataModel in class HtmlDataTableHack
See Also:
HtmlDataTableHack.createDataModel()

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class HtmlDataTableHack

getSerializableDataModel

public org.apache.myfaces.component.html.ext._SerializableDataModel getSerializableDataModel()

isRendered

public boolean isRendered()
Overrides:
isRendered in class javax.faces.component.UIComponentBase

setForceIdIndexFormula

public void setForceIdIndexFormula(String forceIdIndexFormula)

getForceIdIndexFormula

@JSFProperty
public String getForceIdIndexFormula()
A formula that overrides the default row index in the construction of table's body components. Example : #{myRowVar.key} Warning, the EL should evaluate to a unique value for each row !


setSortColumn

public void setSortColumn(String sortColumn)
Specify what column the data should be sorted on.

Note that calling this method immediately stores the value via any value-binding with name "sortColumn". This is done because this method is called by the HtmlCommandSortHeader component when the user has clicked on a column's sort header. In this case, the the model getter method mapped for name "value" needs to read this value in able to return the data in the desired order - but the HtmlCommandSortHeader component is usually "immediate" in order to avoid validating the enclosing form. Yes, this is rather hacky - but it works.


getSortColumn

@JSFProperty
public String getSortColumn()
Value reference to a model property that gives the current sort column name. The target String property is set to the "columnName" of whichever column has been chosen to sort by, and the method which is bound to the "value" attribute of this table (ie which provides the DataModel used) is expected to use this property to determine how to sort the DataModel's contents.


setSortAscending

public void setSortAscending(boolean sortAscending)

isSortAscending

@JSFProperty(defaultValue="true")
public boolean isSortAscending()
Value reference to a model property that gives the current sort direction. The target Boolean property is set to true when the selected sortColumn should be sorted in ascending order, and false otherwise. The method which is bound to the "value" attribute of this table (ie which provides the DataModel used) is expected to use this property to determine how to sort the DataModel's contents.


setSortProperty

public abstract void setSortProperty(String sortProperty)

getSortProperty

@JSFProperty(literalOnly=true,
             tagExcluded=true)
public abstract String getSortProperty()
The name of a javabean property on which the table is sorted.

The datamodel should contain objects that have this property; reflection will be used to sort the datamodel on that property using the default comparator for that type.

This value is part of the component state. However it is not directly settable by users; instead it is set by other components such as a CommandSortHeader.


isSortable

@JSFProperty(defaultValue="false")
public abstract boolean isSortable()
Define if the table is sortable or not


isEmbedded

@JSFProperty(defaultValue="false")
public abstract boolean isEmbedded()
Avoids rendering the html table tags, thus, giving you a table rendering just rows. You can use this together with the detailStamp faces of the parent datatable to render child-tables using the same layout as the parent. Notice: You have to ensure both tables do have the same number of columns. Using the colspan attribute of the column tag might help alot.


isDetailStampExpandedDefault

@JSFProperty(defaultValue="false")
public abstract boolean isDetailStampExpandedDefault()
true|false - true if the detailStamp should be expanded by default. default: false


getDetailStampLocation

@JSFProperty(defaultValue="after")
public abstract String getDetailStampLocation()
before|after - where to render the detailStamp, before the actual row or after it. default: after


getRowOnMouseOver

@JSFProperty(clientEvent="rowMouseOver")
public abstract String getRowOnMouseOver()
Defines a JavaScript onmouseover event handler for each table row


getRowOnMouseOut

@JSFProperty(clientEvent="rowMouseOut")
public abstract String getRowOnMouseOut()
Defines a JavaScript onmouseout event handler for each table row


getRowOnClick

@JSFProperty(clientEvent="rowClick")
public abstract String getRowOnClick()
Defines a JavaScript onclick event handler for each table row


getRowOnDblClick

@JSFProperty(clientEvent="rowDblClick")
public abstract String getRowOnDblClick()
Defines a JavaScript ondblclick event handler for each table row


getRowOnKeyDown

@JSFProperty(clientEvent="rowKeyDown")
public abstract String getRowOnKeyDown()
Defines a JavaScript onkeydown event handler for each table row


getRowOnKeyPress

@JSFProperty(clientEvent="rowKeyPress")
public abstract String getRowOnKeyPress()
Defines a JavaScript onkeypress event handler for each table row


getRowOnKeyUp

@JSFProperty(clientEvent="rowKeyUp")
public abstract String getRowOnKeyUp()
Defines a JavaScript onkeyup event handler for each table row


getRowStyleClass

@JSFProperty
public abstract String getRowStyleClass()
Corresponds to the HTML class attribute for the row tr tag.


getRowStyle

@JSFProperty
public abstract String getRowStyle()
Corresponds to the HTML style attribute for the row tr tag.


getRowOnMouseDown

@JSFProperty(clientEvent="rowMouseDown")
public abstract String getRowOnMouseDown()
Defines a JavaScript onmpusedown event handler for each table row


getRowOnMouseMove

@JSFProperty(clientEvent="rowMouseMove")
public abstract String getRowOnMouseMove()
Defines a JavaScript onmousemove event handler for each table row


getRowOnMouseUp

@JSFProperty(clientEvent="rowMouseUp")
public abstract String getRowOnMouseUp()
Defines a JavaScript onmouseup event handler for each table row


isValidChildren

@JSFProperty(tagExcluded=true)
protected boolean isValidChildren()

setIsValidChildren

protected void setIsValidChildren(boolean isValidChildren)

getPreservedDataModel

protected org.apache.myfaces.component.html.ext._SerializableDataModel getPreservedDataModel()

setPreservedDataModel

protected void setPreservedDataModel(org.apache.myfaces.component.html.ext._SerializableDataModel preservedDataModel)

isCurrentDetailExpanded

public boolean isCurrentDetailExpanded()

setVarDetailToggler

public void setVarDetailToggler(String varDetailToggler)

getVarDetailToggler

@JSFProperty
public String getVarDetailToggler()
This variable has the boolean property "currentdetailExpanded" which is true if the current detail row is expanded and the action method "toggleDetail" which expand/collapse the current detail row.


getRowGroupStyle

@JSFProperty
public abstract String getRowGroupStyle()
Corresponds to the HTML style attribute for grouped rows.


getRowGroupStyleClass

@JSFProperty
public abstract String getRowGroupStyleClass()
StyleClass for grouped rows.


getBodyStyle

@JSFProperty
public abstract String getBodyStyle()
Corresponds to the HTML style attribute for the table body tag


getBodyStyleClass

@JSFProperty
public abstract String getBodyStyleClass()
Corresponds to the HTML class attribute for the table body tag.


toggleDetail

public void toggleDetail()
Change the status of the current detail row from collapsed to expanded or viceversa.


isDetailExpanded

public boolean isDetailExpanded()
Return true if the current detail row is expanded.

Returns:
true if the current detail row is expanded.

getSortColumnIndex

public int getSortColumnIndex()

setSortColumnIndex

public void setSortColumnIndex(int sortColumnIndex)

getNewspaperColumns

@JSFProperty(defaultValue="1")
public abstract int getNewspaperColumns()
The number of columns to wrap the table over. Default: 1 Set the number of columns the table will be divided over.

Specified by:
getNewspaperColumns in interface org.apache.myfaces.component.NewspaperTable

getNewspaperOrientation

@JSFProperty(defaultValue="vertical")
public abstract String getNewspaperOrientation()
The orientation of the newspaper columns in the newspaper table - "horizontal" or "vertical". Default: vertical

Specified by:
getNewspaperOrientation in interface org.apache.myfaces.component.NewspaperTable

getSpacer

@JSFFacet
public javax.faces.component.UIComponent getSpacer()
Gets the spacer facet, between each pair of newspaper columns.

Specified by:
getSpacer in interface org.apache.myfaces.component.NewspaperTable

setSpacer

public void setSpacer(javax.faces.component.UIComponent spacer)

expandAllDetails

public void expandAllDetails()
Expand all details


collapseAllDetails

public void collapseAllDetails()
Collapse all details


isExpandedEmpty

public boolean isExpandedEmpty()
Returns:
true is any of the details is expanded

setExpandedEmpty

public void setExpandedEmpty(boolean expandedEmpty)
Clears expanded nodes set if expandedEmpty is true

Parameters:
expandedEmpty -

isPreserveDataModel

@JSFProperty
public abstract boolean isPreserveDataModel()
Indicates whether the state of the whole DataModel should be saved and restored. When set to false, the value-binding for the "value" attribute of this table is executed each time the page is rendered. When set to true, that value-binding is only executed when the component is first created, and the DataModel state is thereafter saved/restored automatically by the component. When column sorting is used for a table this property needs to be false so that the DataModel can be updated to reflect any changes in the sort criteria. Default: false


isPreserveSort

@JSFProperty(defaultValue="true")
public abstract boolean isPreserveSort()
Indicates whether the state of the sortColumn and sortAscending attribute should be saved and restored and written back to the model during the update model phase. Default: true


isRenderedIfEmpty

@JSFProperty(defaultValue="true")
public abstract boolean isRenderedIfEmpty()
Indicates whether this table should be rendered if the underlying DataModel is empty. You could as well use rendered="#{not empty bean.list}", but this one causes the getList method of your model bean beeing called up to five times per request, which is not optimal when the list is backed by a DB table. Using renderedIfEmpty="false" solves this problem, because the MyFaces extended HtmlDataTable automatically caches the DataModel and calles the model getter only once per request. Default: true


getRowIndexVar

@JSFProperty
public abstract String getRowIndexVar()
A parameter name, under which the current rowIndex is set in request scope similar to the var parameter.


getRowCountVar

@JSFProperty
public abstract String getRowCountVar()
A parameter name, under which the rowCount is set in request scope similar to the var parameter.


getPreviousRowDataVar

@JSFProperty
public abstract String getPreviousRowDataVar()
A parameter name, under which the previous RowData Object is set in request scope similar to the rowIndexVar and rowCountVar parameters. Mind that the value of this request scope attribute is null in the first row or when isRowAvailable returns false for the previous row.


getSortedColumnVar

@JSFProperty
public abstract String getSortedColumnVar()
A parameter name, under which the a boolean is set in request scope similar to the var parameter. TRUE for the column that is currently sorted, FALSE otherwise.


getAlign

@JSFProperty
public abstract String getAlign()
HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.


getRowId

@JSFProperty
public abstract String getRowId()
The id to use for


getDatafld

@JSFProperty
public abstract String getDatafld()
Reserved for future use.


getDatasrc

@JSFProperty
public abstract String getDatasrc()
Reserved for future use.


getDataformatas

@JSFProperty
public abstract String getDataformatas()
Reserved for future use.


getValueType

@JSFProperty
public abstract String getValueType()
Indicate the expected type of the EL expression pointed by value property. It is useful when vb.getType() cannot found the type, like when a map value is resolved on the expression.


isAjaxRowRender

@JSFProperty(defaultValue="false")
public abstract boolean isAjaxRowRender()
Indicate if "row" can be a target for an ajax render operation. In other words, if it is set to true, a special component is added on a facet with name "row" and with id="row" that can be used to indicate it is necessary to render the row. By default is set to false.

Returns:


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.