|
||||||||||
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
public abstract class HtmlDataTableHack
Reimplement all UIData functionality to be able to have (protected) access the internal DataModel.
Nested Class Summary | |
---|---|
protected static class |
HtmlDataTableHack.PropertyKeys
|
Field Summary |
---|
Fields inherited from class javax.faces.component.html.HtmlDataTable |
---|
COMPONENT_FAMILY, COMPONENT_TYPE |
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 javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
HtmlDataTableHack()
|
Method Summary | |
---|---|
protected void |
checkUpdateModelError(javax.faces.context.FacesContext context)
This method is used when a custom processUpdates and processValidators is defined, to check if a update model error forces the render response for our data, because _isValidChilds is a private field and is not available on child components that inherits this component class like t:dataList. |
void |
clearRowStates()
Remove all preserved row state for the dataTable |
protected javax.faces.model.DataModel |
createDataModel()
Creates a new DataModel around the current value. |
void |
deleteRowStateForRow(int deletedIndex)
Remove preserved row state for deleted row and adjust row state to reflect deleted row. |
void |
encodeBegin(javax.faces.context.FacesContext context)
|
void |
encodeEnd(javax.faces.context.FacesContext context)
|
String |
getClientId(javax.faces.context.FacesContext context)
Hack since RI does not call getRowIndex() |
String |
getContainerClientId(javax.faces.context.FacesContext context)
|
protected javax.faces.model.DataModel |
getDataModel()
|
String |
getDerivedRowKeyPrefix()
This attribute is used to append an unique prefix when rowKey is not used, to prevent a key match a existing component id (note two different components can't have the same unique id). |
protected String |
getDerivedSubClientId()
Return the fragment to be used on the container client id to identify a row. |
int |
getRowCount()
|
Object |
getRowData()
|
int |
getRowIndex()
|
Object |
getRowKey()
Used to assign a value expression that identify in a unique way a row. |
protected boolean |
hasErrorMessages(javax.faces.context.FacesContext context)
|
boolean |
isForceId()
If true, this component will force the use of the specified id when rendering. |
boolean |
isForceIdIndex()
If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components that are contained within a "list." This value will be true by default and the value will be ignored if the value of forceId is false (or not specified.) |
boolean |
isPreserveRowComponentState()
Indicates whether the state for a component in each row should not be discarded before the datatable is rendered again. |
boolean |
isPreserveRowStates()
Indicates whether the state for each row should not be discarded before the datatable is rendered again. |
boolean |
isRowAvailable()
|
boolean |
isRowStatePreserved()
Indicates whether the state for a component in each row should not be discarded before the datatable is rendered again. |
void |
markInitialState()
|
void |
processUpdates(javax.faces.context.FacesContext context)
|
void |
processValidators(javax.faces.context.FacesContext context)
|
protected void |
restoreDescendantComponentStates(Iterator<javax.faces.component.UIComponent> childIterator,
Object state,
boolean restoreChildFacets)
|
protected void |
restoreDescendantComponentStates(Object state)
|
protected void |
restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext,
Iterator<javax.faces.component.UIComponent> childIterator,
Map<String,Object> state,
Object initialState,
boolean restoreChildFacets,
String containerClientId)
|
protected void |
restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext,
Map<String,Object> rowState,
Object initialState)
|
protected void |
restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext,
Iterator<javax.faces.component.UIComponent> childIterator,
Object initialState,
boolean restoreChildFacets)
|
protected void |
restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext,
Object initialState)
|
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
|
protected Object |
saveDescendantComponentStates()
|
protected Object |
saveDescendantComponentStates(Iterator<javax.faces.component.UIComponent> childIterator,
boolean saveChildFacets)
|
protected Collection<Object[]> |
saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext)
|
protected Collection<Object[]> |
saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext,
Iterator<javax.faces.component.UIComponent> childIterator,
boolean saveChildFacets)
|
protected Map<String,Object> |
saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext)
|
protected Map<String,Object> |
saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext,
Map<String,Object> stateMap,
Iterator<javax.faces.component.UIComponent> childIterator,
boolean saveChildFacets,
String containerClientId)
|
Object |
saveState(javax.faces.context.FacesContext context)
|
protected void |
setDataModel(javax.faces.model.DataModel datamodel)
|
void |
setDerivedRowKeyPrefix(String derivedRowKeyPrefix)
|
void |
setForceId(boolean forceId)
|
void |
setForceIdIndex(boolean forceIdIndex)
|
void |
setPreserveRowComponentState(boolean preserveComponentState)
|
void |
setPreserveRowStates(boolean preserveRowStates)
|
void |
setRowIndex(int rowIndex)
|
void |
setRowKey(Object rowKey)
|
void |
setRowStatePreserved(boolean preserveComponentState)
|
void |
setValue(Object value)
|
void |
setValueBinding(String name,
javax.faces.el.ValueBinding binding)
|
void |
setValueExpression(String name,
javax.el.ValueExpression binding)
|
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, getFirst, getFooter, getHeader, getRows, getValue, getVar, invokeOnComponent, processDecodes, queueEvent, setFirst, setFooter, setHeader, setRows, setVar, visitTree |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addFacesListener, clearInitialState, decode, encodeAll, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getDefaultEventName, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, isRendered, 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 javax.faces.component.behavior.ClientBehaviorHolder |
---|
getClientBehaviors, getDefaultEventName |
Constructor Detail |
---|
public HtmlDataTableHack()
Method Detail |
---|
public boolean isRowAvailable()
isRowAvailable
in class javax.faces.component.UIData
public int getRowCount()
getRowCount
in class javax.faces.component.UIData
public Object getRowData()
getRowData
in class javax.faces.component.UIData
public int getRowIndex()
getRowIndex
in class javax.faces.component.UIData
public String getClientId(javax.faces.context.FacesContext context)
getClientId
in class javax.faces.component.UIComponentBase
public String getContainerClientId(javax.faces.context.FacesContext context)
getContainerClientId
in class javax.faces.component.UIData
public void processUpdates(javax.faces.context.FacesContext context)
processUpdates
in class javax.faces.component.UIData
UIData.processUpdates(javax.faces.context.FacesContext)
protected void checkUpdateModelError(javax.faces.context.FacesContext context)
public void processValidators(javax.faces.context.FacesContext context)
processValidators
in class javax.faces.component.UIData
UIData.processValidators(javax.faces.context.FacesContext)
public void encodeBegin(javax.faces.context.FacesContext context) throws IOException
encodeBegin
in class javax.faces.component.UIData
IOException
UIData.encodeBegin(javax.faces.context.FacesContext)
public void setPreserveRowStates(boolean preserveRowStates)
public boolean isPreserveRowStates()
@JSFProperty(literalOnly=true, faceletsOnly=true, defaultValue="false") public boolean isRowStatePreserved()
public void setRowStatePreserved(boolean preserveComponentState)
protected boolean hasErrorMessages(javax.faces.context.FacesContext context)
public void encodeEnd(javax.faces.context.FacesContext context) throws IOException
encodeEnd
in class javax.faces.component.UIData
IOException
UIComponentBase.encodeEnd(javax.faces.context.FacesContext)
public void setRowIndex(int rowIndex)
setRowIndex
in class javax.faces.component.UIData
protected void restoreDescendantComponentStates(Object state)
protected void restoreDescendantComponentStates(Iterator<javax.faces.component.UIComponent> childIterator, Object state, boolean restoreChildFacets)
protected Object saveDescendantComponentStates()
protected Object saveDescendantComponentStates(Iterator<javax.faces.component.UIComponent> childIterator, boolean saveChildFacets)
public void markInitialState()
markInitialState
in interface javax.faces.component.PartialStateHolder
markInitialState
in class javax.faces.component.UIComponentBase
protected void restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext, Object initialState)
protected void restoreFullDescendantComponentStates(javax.faces.context.FacesContext facesContext, Iterator<javax.faces.component.UIComponent> childIterator, Object initialState, boolean restoreChildFacets)
protected Collection<Object[]> saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext)
protected Collection<Object[]> saveDescendantInitialComponentStates(javax.faces.context.FacesContext facesContext, Iterator<javax.faces.component.UIComponent> childIterator, boolean saveChildFacets)
protected Map<String,Object> saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext)
protected Map<String,Object> saveFullDescendantComponentStates(javax.faces.context.FacesContext facesContext, Map<String,Object> stateMap, Iterator<javax.faces.component.UIComponent> childIterator, boolean saveChildFacets, String containerClientId)
protected void restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext, Map<String,Object> rowState, Object initialState)
protected void restoreFullDescendantComponentDeltaStates(javax.faces.context.FacesContext facesContext, Iterator<javax.faces.component.UIComponent> childIterator, Map<String,Object> state, Object initialState, boolean restoreChildFacets, String containerClientId)
public void restoreState(javax.faces.context.FacesContext context, Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
public void setValueBinding(String name, javax.faces.el.ValueBinding binding)
setValueBinding
in class javax.faces.component.html.HtmlDataTable
public void setValueExpression(String name, javax.el.ValueExpression binding)
setValueExpression
in class javax.faces.component.html.HtmlDataTable
public void setValue(Object value)
setValue
in class javax.faces.component.UIData
UIData.setValue(java.lang.Object)
protected javax.faces.model.DataModel getDataModel()
getDataModel
in class javax.faces.component.UIData
protected void setDataModel(javax.faces.model.DataModel datamodel)
setDataModel
in class javax.faces.component.UIData
protected javax.faces.model.DataModel createDataModel()
public boolean isForceId()
isForceId
in interface org.apache.myfaces.custom.ExtendedComponentBase
public void setForceId(boolean forceId)
setForceId
in interface org.apache.myfaces.custom.ExtendedComponentBase
public boolean isForceIdIndex()
public void setForceIdIndex(boolean forceIdIndex)
public void clearRowStates()
public void deleteRowStateForRow(int deletedIndex)
deletedIndex
- index of row to delete@JSFProperty(faceletsOnly=true, literalOnly=true) public boolean isPreserveRowComponentState()
public void setPreserveRowComponentState(boolean preserveComponentState)
@JSFProperty public Object getRowKey()
public void setRowKey(Object rowKey)
@JSFProperty(defaultValue="r_id_") public String getDerivedRowKeyPrefix()
public void setDerivedRowKeyPrefix(String derivedRowKeyPrefix)
protected String getDerivedSubClientId()
The returned value must comply with the following rules:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |