|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIData
javax.faces.component.html.HtmlDataTable
org.apache.myfaces.component.html.ext.HtmlDataTableHack
org.apache.myfaces.component.html.ext.AbstractHtmlDataTable
@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
The MyFacesDataTable extends the standard JSF DataTable by two
important features:
Nested Class Summary | |
---|---|
protected static class |
AbstractHtmlDataTable.PropertyKeys
|
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_TYPE
|
static java.lang.String |
DEFAULT_RENDERER_TYPE
|
static java.lang.String |
DETAIL_STAMP_FACET_NAME
|
static java.lang.String |
DETAIL_STAMP_ROW_FACET_NAME
|
static java.lang.String |
NEWSPAPER_COLUMNS_PROPERTY
the property names |
static java.lang.String |
NEWSPAPER_ORIENTATION_PROPERTY
|
static java.lang.String |
SPACER_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(java.lang.String columnName)
|
protected javax.faces.model.DataModel |
createDataModel()
Creates a new DataModel around the current value. |
protected HtmlCommandSortHeader |
createSortHeaderComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIColumn parentColumn,
javax.faces.component.UIComponent initialHeaderFacet,
java.lang.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(java.lang.String expr)
|
abstract java.lang.String |
getAlign()
HTML: Specifies the horizontal alignment of this element. |
abstract java.lang.String |
getBodyStyle()
Corresponds to the HTML style attribute for the table body tag |
abstract java.lang.String |
getBodyStyleClass()
Corresponds to the HTML class attribute for the table body tag. |
java.lang.String |
getContainerClientId(javax.faces.context.FacesContext context)
|
abstract java.lang.String |
getDatafld()
Reserved for future use. |
abstract java.lang.String |
getDataformatas()
Reserved for future use. |
protected javax.faces.model.DataModel |
getDataModel()
|
abstract java.lang.String |
getDatasrc()
Reserved for future use. |
abstract java.lang.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. |
java.lang.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 java.lang.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 java.lang.String |
getPreviousRowDataVar()
A parameter name, under which the previous RowData Object is set in request scope similar to the rowIndexVar and rowCountVar parameters. |
abstract java.lang.String |
getRowCountVar()
A parameter name, under which the rowCount is set in request scope similar to the var parameter. |
abstract java.lang.String |
getRowGroupStyle()
Corresponds to the HTML style attribute for grouped rows. |
abstract java.lang.String |
getRowGroupStyleClass()
StyleClass for grouped rows. |
abstract java.lang.String |
getRowId()
The id to use for |
abstract java.lang.String |
getRowIndexVar()
A parameter name, under which the current rowIndex is set in request scope similar to the var parameter. |
abstract java.lang.String |
getRowOnClick()
Defines a JavaScript onclick event handler for each table row |
abstract java.lang.String |
getRowOnDblClick()
Defines a JavaScript ondblclick event handler for each table row |
abstract java.lang.String |
getRowOnKeyDown()
Defines a JavaScript onkeydown event handler for each table row |
abstract java.lang.String |
getRowOnKeyPress()
Defines a JavaScript onkeypress event handler for each table row |
abstract java.lang.String |
getRowOnKeyUp()
Defines a JavaScript onkeyup event handler for each table row |
abstract java.lang.String |
getRowOnMouseDown()
Defines a JavaScript onmpusedown event handler for each table row |
abstract java.lang.String |
getRowOnMouseMove()
Defines a JavaScript onmousemove event handler for each table row |
abstract java.lang.String |
getRowOnMouseOut()
Defines a JavaScript onmouseout event handler for each table row |
abstract java.lang.String |
getRowOnMouseOver()
Defines a JavaScript onmouseover event handler for each table row |
abstract java.lang.String |
getRowOnMouseUp()
Defines a JavaScript onmouseup event handler for each table row |
int |
getRows()
The number of rows to be displayed. |
abstract java.lang.String |
getRowStyle()
Corresponds to the HTML style attribute for the row tr tag. |
abstract java.lang.String |
getRowStyleClass()
Corresponds to the HTML class attribute for the row tr tag. |
org.apache.myfaces.component.html.ext._SerializableDataModel |
getSerializableDataModel()
|
java.lang.String |
getSortColumn()
Value reference to a model property that gives the current sort column name. |
int |
getSortColumnIndex()
|
abstract java.lang.String |
getSortedColumnVar()
A parameter name, under which the a boolean is set in request scope similar to the var parameter. |
abstract java.lang.String |
getSortProperty()
The name of a javabean property on which the table is sorted. |
protected java.lang.String |
getSortPropertyFromEL(javax.faces.component.UIComponent component)
|
javax.faces.component.UIComponent |
getSpacer()
Gets the spacer facet, between each pair of newspaper columns. |
TableContext |
getTableContext()
|
abstract java.lang.String |
getValueType()
Indicate the expected type of the EL expression pointed by value property. |
java.lang.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,
java.lang.String clientId,
javax.faces.component.ContextCallback callback)
|
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(java.lang.Object state)
|
protected void |
restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext,
java.util.Map<java.lang.String,java.lang.Object> rowState,
java.lang.Object initialState)
|
protected void |
restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext,
java.lang.Object initialState)
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
protected java.lang.Object |
saveDescendantComponentStates()
|
protected java.util.Collection<java.lang.Object[]> |
saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext)
|
protected java.util.Map<java.lang.String,java.lang.Object> |
saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setExpandedEmpty(boolean expandedEmpty)
Clears expanded nodes set if expandedEmpty is true |
void |
setFirst(int first)
|
void |
setForceIdIndexFormula(java.lang.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(java.lang.String sortColumn)
Specify what column the data should be sorted on. |
void |
setSortColumnIndex(int sortColumnIndex)
|
abstract void |
setSortProperty(java.lang.String sortProperty)
|
void |
setSpacer(javax.faces.component.UIComponent spacer)
|
void |
setVarDetailToggler(java.lang.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 javax.faces.component.html.HtmlDataTable |
---|
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 |
---|
addClientBehavior, addFacesListener, clearInitialState, decode, 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 |
---|
encodeAll, 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 |
---|
addClientBehavior, getClientBehaviors, getDefaultEventName |
Field Detail |
---|
public static final java.lang.String NEWSPAPER_COLUMNS_PROPERTY
public static final java.lang.String SPACER_FACET_NAME
public static final java.lang.String NEWSPAPER_ORIENTATION_PROPERTY
public static final java.lang.String DETAIL_STAMP_FACET_NAME
public static final java.lang.String DETAIL_STAMP_ROW_FACET_NAME
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String DEFAULT_RENDERER_TYPE
Constructor Detail |
---|
public AbstractHtmlDataTable()
Method Detail |
---|
public TableContext getTableContext()
public java.lang.String getContainerClientId(javax.faces.context.FacesContext context)
getContainerClientId
in class HtmlDataTableHack
public javax.faces.component.UIComponent findComponent(java.lang.String expr)
findComponent
in class javax.faces.component.UIComponentBase
public boolean invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback) throws javax.faces.FacesException
invokeOnComponent
in class javax.faces.component.UIData
javax.faces.FacesException
public boolean visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)
visitTree
in class javax.faces.component.UIData
public void setRowIndex(int rowIndex)
setRowIndex
in class HtmlDataTableHack
protected java.lang.Object saveDescendantComponentStates()
saveDescendantComponentStates
in class HtmlDataTableHack
protected void restoreDescendantComponentStates(java.lang.Object state)
restoreDescendantComponentStates
in class HtmlDataTableHack
protected void restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext, java.util.Map<java.lang.String,java.lang.Object> rowState, java.lang.Object initialState)
restoreFullDescendantComponentDeltaStates
in class HtmlDataTableHack
protected void restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext, java.lang.Object initialState)
restoreFullDescendantComponentStates
in class HtmlDataTableHack
protected java.util.Collection<java.lang.Object[]> saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext)
saveDescendantInitialComponentStates
in class HtmlDataTableHack
protected java.util.Map<java.lang.String,java.lang.Object> saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext)
saveFullDescendantComponentStates
in class HtmlDataTableHack
public void processDecodes(javax.faces.context.FacesContext context)
processDecodes
in class javax.faces.component.UIData
public void processValidators(javax.faces.context.FacesContext context)
processValidators
in class HtmlDataTableHack
UIData.processValidators(javax.faces.context.FacesContext)
public void processUpdates(javax.faces.context.FacesContext context)
processUpdates
in class HtmlDataTableHack
UIData.processUpdates(javax.faces.context.FacesContext)
public void markInitialState()
markInitialState
in interface javax.faces.component.PartialStateHolder
markInitialState
in class HtmlDataTableHack
public void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException
encodeBegin
in class HtmlDataTableHack
java.io.IOException
UIData.encodeBegin(javax.faces.context.FacesContext)
protected boolean isSortHeaderNeeded(javax.faces.component.UIColumn parentColumn, javax.faces.component.UIComponent headerFacet)
protected HtmlCommandSortHeader createSortHeaderComponent(javax.faces.context.FacesContext context, javax.faces.component.UIColumn parentColumn, javax.faces.component.UIComponent initialHeaderFacet, java.lang.String propertyName)
protected java.lang.String getSortPropertyFromEL(javax.faces.component.UIComponent component)
protected int columnNameToIndex(java.lang.String columnName)
public void encodeEnd(javax.faces.context.FacesContext context) throws java.io.IOException
encodeEnd
in class HtmlDataTableHack
java.io.IOException
UIData.encodeEnd(javax.faces.context.FacesContext)
@JSFProperty public int getFirst()
getFirst
in class javax.faces.component.UIData
public void setFirst(int first)
setFirst
in class javax.faces.component.UIData
@JSFProperty public int getRows()
getRows
in class javax.faces.component.UIData
public void setRows(int rows)
setRows
in class javax.faces.component.UIData
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class HtmlDataTableHack
protected javax.faces.model.DataModel getDataModel()
getDataModel
in class HtmlDataTableHack
HtmlDataTableHack.getDataModel()
protected javax.faces.model.DataModel createDataModel()
HtmlDataTableHack
createDataModel
in class HtmlDataTableHack
HtmlDataTableHack.createDataModel()
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class HtmlDataTableHack
public org.apache.myfaces.component.html.ext._SerializableDataModel getSerializableDataModel()
public boolean isRendered()
isRendered
in class javax.faces.component.UIComponentBase
public void setForceIdIndexFormula(java.lang.String forceIdIndexFormula)
@JSFProperty public java.lang.String getForceIdIndexFormula()
public void setSortColumn(java.lang.String sortColumn)
@JSFProperty public java.lang.String getSortColumn()
public void setSortAscending(boolean sortAscending)
@JSFProperty(defaultValue="true") public boolean isSortAscending()
public abstract void setSortProperty(java.lang.String sortProperty)
@JSFProperty(literalOnly=true, tagExcluded=true) public abstract java.lang.String getSortProperty()
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.
@JSFProperty(defaultValue="false") public abstract boolean isSortable()
@JSFProperty(defaultValue="false") public abstract boolean isEmbedded()
@JSFProperty(defaultValue="false") public abstract boolean isDetailStampExpandedDefault()
@JSFProperty(defaultValue="after") public abstract java.lang.String getDetailStampLocation()
@JSFProperty(clientEvent="rowMouseOver") public abstract java.lang.String getRowOnMouseOver()
@JSFProperty(clientEvent="rowMouseOut") public abstract java.lang.String getRowOnMouseOut()
@JSFProperty(clientEvent="rowClick") public abstract java.lang.String getRowOnClick()
@JSFProperty(clientEvent="rowDblClick") public abstract java.lang.String getRowOnDblClick()
@JSFProperty(clientEvent="rowKeyDown") public abstract java.lang.String getRowOnKeyDown()
@JSFProperty(clientEvent="rowKeyPress") public abstract java.lang.String getRowOnKeyPress()
@JSFProperty(clientEvent="rowKeyUp") public abstract java.lang.String getRowOnKeyUp()
@JSFProperty public abstract java.lang.String getRowStyleClass()
@JSFProperty public abstract java.lang.String getRowStyle()
@JSFProperty(clientEvent="rowMouseDown") public abstract java.lang.String getRowOnMouseDown()
@JSFProperty(clientEvent="rowMouseMove") public abstract java.lang.String getRowOnMouseMove()
@JSFProperty(clientEvent="rowMouseUp") public abstract java.lang.String getRowOnMouseUp()
@JSFProperty(tagExcluded=true) protected boolean isValidChildren()
protected void setIsValidChildren(boolean isValidChildren)
protected org.apache.myfaces.component.html.ext._SerializableDataModel getPreservedDataModel()
protected void setPreservedDataModel(org.apache.myfaces.component.html.ext._SerializableDataModel preservedDataModel)
public boolean isCurrentDetailExpanded()
public void setVarDetailToggler(java.lang.String varDetailToggler)
@JSFProperty public java.lang.String getVarDetailToggler()
@JSFProperty public abstract java.lang.String getRowGroupStyle()
@JSFProperty public abstract java.lang.String getRowGroupStyleClass()
@JSFProperty public abstract java.lang.String getBodyStyle()
@JSFProperty public abstract java.lang.String getBodyStyleClass()
public void toggleDetail()
public boolean isDetailExpanded()
public int getSortColumnIndex()
public void setSortColumnIndex(int sortColumnIndex)
@JSFProperty(defaultValue="1") public abstract int getNewspaperColumns()
getNewspaperColumns
in interface NewspaperTable
@JSFProperty(defaultValue="vertical") public abstract java.lang.String getNewspaperOrientation()
getNewspaperOrientation
in interface NewspaperTable
@JSFFacet public javax.faces.component.UIComponent getSpacer()
getSpacer
in interface NewspaperTable
public void setSpacer(javax.faces.component.UIComponent spacer)
public void expandAllDetails()
public void collapseAllDetails()
public boolean isExpandedEmpty()
public void setExpandedEmpty(boolean expandedEmpty)
expandedEmpty
- @JSFProperty public abstract boolean isPreserveDataModel()
@JSFProperty(defaultValue="true") public abstract boolean isPreserveSort()
@JSFProperty(defaultValue="true") public abstract boolean isRenderedIfEmpty()
@JSFProperty public abstract java.lang.String getRowIndexVar()
@JSFProperty public abstract java.lang.String getRowCountVar()
@JSFProperty public abstract java.lang.String getPreviousRowDataVar()
@JSFProperty public abstract java.lang.String getSortedColumnVar()
@JSFProperty public abstract java.lang.String getAlign()
@JSFProperty public abstract java.lang.String getRowId()
@JSFProperty public abstract java.lang.String getDatafld()
@JSFProperty public abstract java.lang.String getDatasrc()
@JSFProperty public abstract java.lang.String getDataformatas()
public abstract java.lang.String getValueType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |