public class Sheet
extends javax.faces.component.UIInput
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPONENT_FAMILY |
static java.lang.String |
COMPONENT_TYPE |
static java.lang.String |
EVENT_CELL_SELECT |
static java.lang.String |
EVENT_CHANGE |
static java.lang.String |
EVENT_COLUMN_SELECT |
static java.lang.String |
EVENT_FILTER |
static java.lang.String |
EVENT_ROW_SELECT |
static java.lang.String |
EVENT_SORT |
ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE, CONVERSION_MESSAGE_ID, EMPTY_STRING_AS_NULL_PARAM_NAME, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME| Constructor and Description |
|---|
Sheet() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendUpdateEvent(java.lang.Object rowKey,
int colIndex,
java.lang.Object rowData,
java.lang.Object oldValue,
java.lang.Object newValue)
Appends an update event
|
void |
commitUpdates()
Invoke this method to commit the most recent set of ajax updates and restart the tracking of changes.
|
protected org.primefaces.model.SortOrder |
convertSortOrder()
Convert to PF SortOrder enum since we are leveraging PF sorting code.
|
java.lang.String |
getActiveHeaderStyleClass() |
java.util.List<SheetColumn> |
getColumns()
The list of child columns.
|
java.lang.String |
getCommentedCellStyleClass() |
java.lang.String |
getCurrentColStyleClass() |
java.lang.String |
getCurrentHeaderStyleClass() |
java.lang.String |
getCurrentRowStyleClass() |
java.lang.String |
getDefaultEventName() |
java.lang.String |
getEmptyMessage() |
java.lang.String |
getErrorMessage()
The error message to display when the sheet is in error.
|
java.util.Collection<java.lang.String> |
getEventNames() |
java.lang.String |
getExtender() |
java.lang.String |
getFamily() |
java.util.List |
getFilteredValue()
Holds the filtered and sorted List of values.
|
java.lang.Integer |
getFixedCols() |
java.lang.Integer |
getFixedRows() |
java.lang.Integer |
getFixedRowsBottom() |
java.lang.String |
getFocusId()
The focusId value.
|
java.lang.Integer |
getHeight()
The height of the sheet.
|
java.lang.String |
getInvalidCellStyleClass() |
java.lang.String |
getInvalidDataValue()
Generates the bad data var value for this sheet.
|
java.util.List<SheetInvalidUpdate> |
getInvalidUpdates()
The list of invalid updates
|
java.lang.String |
getLocale() |
java.lang.Object |
getLocalValue(java.lang.String rowKey,
int col)
Retrieves the submitted value for the rowKey and col.
|
int |
getMappedColumn(int renderCol)
Maps the rendered column index to the real column index.
|
java.lang.Integer |
getMaxCols() |
java.lang.Integer |
getMaxRows() |
java.lang.Integer |
getMinCols() |
java.lang.Integer |
getMinRows() |
java.lang.String |
getNoWordWrapStyleClass() |
java.lang.Integer |
getNullSortOrder() |
java.lang.String |
getPlaceholderCellStyleClass() |
java.lang.String |
getReadOnlyCellStyleClass() |
java.util.List<SheetColumn> |
getRenderedColumns()
The list of rendered child columns.
|
int |
getRenderIndexFromRealIdx(int realIdx)
Provides the render column index based on the real index
|
java.lang.String |
getRenderValueForCell(javax.faces.context.FacesContext context,
java.lang.String rowKey,
int col)
Gets the render string for the value the given cell.
|
int |
getRowCount()
The number of rows in the value list.
|
protected java.lang.String |
getRowHeaderValueAsString(javax.faces.context.FacesContext context)
Gets the row header text value as a string for use in javascript
|
protected javax.el.ValueExpression |
getRowHeaderValueExpression()
Gets the rowHeader value expression defined
|
protected java.lang.Object |
getRowKeyValue(javax.faces.context.FacesContext context)
Gets the rowKey for the current row
|
protected java.lang.String |
getRowKeyValueAsString(javax.faces.context.FacesContext context)
Gets the row key value as a string for the current row var.
|
protected java.lang.String |
getRowKeyValueAsString(java.lang.Object key)
Gets the row key value as a String suitable for use in javascript rendering.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getRowMap() |
java.lang.String |
getRowStyleClass() |
java.lang.Integer |
getSelectedColumn()
The currently selected column.
|
java.lang.Integer |
getSelectedLastColumn()
The currently selected column.
|
java.lang.Integer |
getSelectedLastRow()
The currently selected row.
|
java.lang.Integer |
getSelectedRow()
The currently selected row.
|
java.lang.String |
getSelection()
The selection value.
|
java.lang.String |
getSelectionMode() |
java.lang.Object |
getSortBy()
Please note: The return type needs to be
Object. |
int |
getSortColRenderIndex()
Gets the rendered col index of the column corresponding to the current sortBy.
|
java.util.List<java.lang.Object> |
getSortedValues()
The sorted list of values.
|
java.lang.String |
getSortOrder()
The sort direction
|
java.lang.String |
getStretchH() |
java.lang.String |
getStyle()
The style value
|
java.lang.String |
getStyleClass() |
java.lang.Object |
getSubmittedValue() |
java.lang.String |
getSubmittedValue(java.lang.String rowKey,
int col)
Retrieves the submitted value for the row and col.
|
java.util.List<SheetUpdate> |
getUpdates()
A list of updates from the last submission or ajax event.
|
java.lang.Object |
getValue()
Return the value of the Sheet.
|
java.lang.Object |
getValueForCell(javax.faces.context.FacesContext context,
java.lang.String rowKey,
int col)
Gets the object value of the row and col specified.
|
java.lang.String |
getVar()
Return the request-scope attribute under which the data object for the current row will be exposed when iterating.
|
java.lang.Integer |
getWidth() |
boolean |
isCaseSensitiveSort() |
boolean |
isHasStyledCells()
Returns true if any of the columns contain conditional styling.
|
boolean |
isMovableCols() |
boolean |
isMovableRows() |
boolean |
isReadOnly() |
boolean |
isResizableCols() |
boolean |
isResizableRows() |
boolean |
isShowColumnHeaders() |
boolean |
isShowRowHeaders() |
protected boolean |
matchesFilter()
Evaluates the specified item value against the column filters and if they match, returns true, otherwise false.
|
void |
queueEvent(javax.faces.event.FacesEvent event) |
protected void |
remapFilteredList(java.util.List filteredList)
Remaps the row keys in a hash map.
|
protected void |
remapRows()
Remaps the row keys in a hash map.
|
void |
renderBadUpdateScript()
Adds eval scripts to update the bad data array in the sheet to render validation failures produced by the most recent ajax update attempt.
|
void |
renderRowUpdateScript(javax.faces.context.FacesContext context,
java.util.Set<java.lang.String> dirtyRows)
Adds eval scripts to the ajax response to update the rows dirtied by the most recent successful update request.
|
void |
reset()
Resets all filters, sorting and submitted values.
|
void |
resetInvalidUpdates()
Resets invalid updates
|
void |
resetSort()
Resets the sorting to the originally specified values (if any)
|
void |
resetSubmitted()
Resets the submitted values
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Restores the state for the submitted, local and bad values.
|
void |
saveSortByColumn(java.lang.String columnId)
Saves the column by which the sheet is currently sorted (when the user clicks on a column).
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
Saves the state of the submitted and local values and the bad updates.
|
void |
setActiveHeaderStyleClass(java.lang.String value) |
void |
setCaseSensitiveSort(boolean value) |
void |
setColumns(java.util.List<SheetColumn> columns)
Updates the list of child columns.
|
void |
setCommentedCellStyleClass(java.lang.String value) |
void |
setCurrentColStyleClass(java.lang.String value) |
void |
setCurrentHeaderStyleClass(java.lang.String value) |
void |
setCurrentRowStyleClass(java.lang.String value) |
void |
setEmptyMessage(java.lang.String value) |
void |
setErrorMessage(java.lang.String value)
Updates the errorMessage value.
|
void |
setExtender(java.lang.String extender) |
void |
setFilteredValue(java.util.List filteredValue)
Sets the filtered list.
|
void |
setFixedCols(java.lang.Integer value) |
void |
setFixedRows(java.lang.Integer value) |
void |
setFixedRowsBottom(java.lang.Integer value) |
void |
setFocusId(java.lang.String focusId)
Updates the focusId value.
|
void |
setHeight(java.lang.Integer value)
Updates the height
|
void |
setInvalidCellStyleClass(java.lang.String value) |
void |
setLocale(java.lang.String locale) |
void |
setLocalValue(java.lang.String rowKey,
int col,
java.lang.Object value)
Updates a local value.
|
void |
setMaxCols(java.lang.Integer value) |
void |
setMaxRows(java.lang.Integer value) |
void |
setMinCols(java.lang.Integer value) |
void |
setMinRows(java.lang.Integer value) |
void |
setMovableCols(boolean value) |
void |
setMovableRows(boolean value) |
void |
setNoWordWrapStyleClass(java.lang.String value) |
void |
setNullSortOrder(java.lang.Integer value) |
void |
setPlaceholderCellStyleClass(java.lang.String value) |
void |
setReadOnly(boolean value) |
void |
setReadOnlyCellStyleClass(java.lang.String value) |
void |
setResizableCols(boolean value) |
void |
setResizableRows(boolean value) |
void |
setRowStyleClass(java.lang.String styleClass) |
void |
setRowVar(javax.faces.context.FacesContext context,
java.lang.String rowKey)
Updates the row var for iterations over the list.
|
void |
setSelectedColumn(java.lang.Integer col)
Updates the selected column.
|
void |
setSelectedLastColumn(java.lang.Integer col)
Updates the selected column.
|
void |
setSelectedLastRow(java.lang.Integer row)
Updates the selected row.
|
void |
setSelectedRow(java.lang.Integer row)
Updates the selected row.
|
void |
setSelection(java.lang.String selection)
Updates the selection value.
|
void |
setSelectionMode(java.lang.String value) |
void |
setShowColumnHeaders(boolean value) |
void |
setShowRowHeaders(boolean value) |
void |
setSortBy(java.lang.Object sortBy) |
void |
setSortOrder(java.lang.String sortOrder)
Update the sort direction
|
void |
setStretchH(java.lang.String value) |
void |
setStyle(java.lang.String value)
Update the style value for the component
|
void |
setStyleClass(java.lang.String styleClass) |
void |
setSubmittedValue(java.lang.Object submittedValue) |
void |
setSubmittedValue(java.lang.String rowKey,
int col,
java.lang.String value)
Updates a submitted value.
|
void |
setValue(java.lang.Object value)
Set the value of the
Sheet. |
void |
setVar(java.lang.String var)
Set the request-scope attribute under which the data object for the current row wil be exposed when iterating.
|
void |
setWidth(java.lang.Integer value) |
java.util.List<java.lang.Object> |
sortAndFilter()
Sorts and filters the data
|
void |
updateColumnMappings()
Updates the column mappings based on the rendered attribute
|
void |
updateModel(javax.faces.context.FacesContext context)
Override to update model with local values.
|
void |
validate(javax.faces.context.FacesContext context)
Converts each submitted value into a local value and stores it back in the hash.
|
addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setValid, setValidator, setValidatorMessage, setValueChangeListener, validateValuegetConverter, getLocalValue, setConverteraddClientBehavior, addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEventencodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTreeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClientBehavior, getClientBehaviorspublic static final java.lang.String EVENT_CELL_SELECT
public static final java.lang.String EVENT_CHANGE
public static final java.lang.String EVENT_SORT
public static final java.lang.String EVENT_FILTER
public static final java.lang.String EVENT_COLUMN_SELECT
public static final java.lang.String EVENT_ROW_SELECT
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String COMPONENT_FAMILY
public java.lang.String getFamily()
public java.util.Collection<java.lang.String> getEventNames()
getEventNames in interface javax.faces.component.behavior.ClientBehaviorHoldergetEventNames in class javax.faces.component.UIComponentBasepublic java.lang.String getDefaultEventName()
getDefaultEventName in interface javax.faces.component.behavior.ClientBehaviorHoldergetDefaultEventName in class javax.faces.component.UIComponentBasepublic void queueEvent(javax.faces.event.FacesEvent event)
queueEvent in class javax.faces.component.UIComponentBasepublic java.util.List<SheetColumn> getColumns()
public java.util.List<SheetColumn> getRenderedColumns()
public void setColumns(java.util.List<SheetColumn> columns)
public java.util.List<SheetInvalidUpdate> getInvalidUpdates()
public void resetSubmitted()
public void resetSort()
public void resetInvalidUpdates()
public void reset()
public void setSubmittedValue(java.lang.String rowKey,
int col,
java.lang.String value)
public java.lang.String getSubmittedValue(java.lang.String rowKey,
int col)
public void setLocalValue(java.lang.String rowKey,
int col,
java.lang.Object value)
public java.lang.Object getLocalValue(java.lang.String rowKey,
int col)
public void setRowVar(javax.faces.context.FacesContext context,
java.lang.String rowKey)
context - the FacesContext against which to the row var is set. Passed for performancerowKey - the rowKey stringprotected java.util.Map<java.lang.String,java.lang.Object> getRowMap()
public java.lang.Object getValueForCell(javax.faces.context.FacesContext context,
java.lang.String rowKey,
int col)
public java.lang.String getRenderValueForCell(javax.faces.context.FacesContext context,
java.lang.String rowKey,
int col)
protected java.lang.String getRowHeaderValueAsString(javax.faces.context.FacesContext context)
public java.util.List<java.lang.Object> getSortedValues()
public int getSortColRenderIndex()
protected boolean matchesFilter()
public java.util.List<java.lang.Object> sortAndFilter()
protected void remapFilteredList(java.util.List filteredList)
protected void remapRows()
protected java.lang.Object getRowKeyValue(javax.faces.context.FacesContext context)
context - the faces contextprotected java.lang.String getRowKeyValueAsString(java.lang.Object key)
protected java.lang.String getRowKeyValueAsString(javax.faces.context.FacesContext context)
protected org.primefaces.model.SortOrder convertSortOrder()
public void validate(javax.faces.context.FacesContext context)
validate in class javax.faces.component.UIInputpublic void updateModel(javax.faces.context.FacesContext context)
updateModel in class javax.faces.component.UIInputpublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class javax.faces.component.UIInputpublic void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class javax.faces.component.UIInputpublic java.lang.String getSelection()
public void setSelection(java.lang.String selection)
selection - the selection to setpublic java.lang.Object getSubmittedValue()
getSubmittedValue in interface javax.faces.component.EditableValueHoldergetSubmittedValue in class javax.faces.component.UIInputpublic void setSubmittedValue(java.lang.Object submittedValue)
setSubmittedValue in interface javax.faces.component.EditableValueHoldersetSubmittedValue in class javax.faces.component.UIInputpublic java.util.List<SheetUpdate> getUpdates()
public boolean isHasStyledCells()
public int getMappedColumn(int renderCol)
renderCol - the rendered indexpublic int getRenderIndexFromRealIdx(int realIdx)
public void updateColumnMappings()
public int getRowCount()
public java.lang.String getFocusId()
public void setFocusId(java.lang.String focusId)
focusId - the focusId to setpublic void commitUpdates()
public java.lang.String getInvalidDataValue()
public void renderRowUpdateScript(javax.faces.context.FacesContext context,
java.util.Set<java.lang.String> dirtyRows)
context - the FacesContextdirtyRows - the set of dirty rowspublic void renderBadUpdateScript()
public void appendUpdateEvent(java.lang.Object rowKey,
int colIndex,
java.lang.Object rowData,
java.lang.Object oldValue,
java.lang.Object newValue)
public void setStyleClass(java.lang.String styleClass)
public java.lang.String getStyleClass()
public void setStretchH(java.lang.String value)
public java.lang.String getStretchH()
public void setEmptyMessage(java.lang.String value)
public java.lang.String getEmptyMessage()
public java.lang.Object getSortBy()
Object. Otherwise, evaluating the sortBy attribute as a value expression forces it into a
string, and strings are sorted differently than numbers.public void setSortBy(java.lang.Object sortBy)
public void setShowColumnHeaders(boolean value)
public boolean isShowColumnHeaders()
public void setShowRowHeaders(boolean value)
public boolean isShowRowHeaders()
public void setResizableRows(boolean value)
public boolean isResizableRows()
public void setResizableCols(boolean value)
public boolean isResizableCols()
public void setMovableRows(boolean value)
public boolean isMovableRows()
public void setMovableCols(boolean value)
public boolean isMovableCols()
public void setRowStyleClass(java.lang.String styleClass)
public java.lang.String getRowStyleClass()
public java.lang.String getActiveHeaderStyleClass()
public void setReadOnly(boolean value)
public boolean isReadOnly()
public void setActiveHeaderStyleClass(java.lang.String value)
public java.lang.String getCommentedCellStyleClass()
public void setCommentedCellStyleClass(java.lang.String value)
public java.lang.String getCurrentColStyleClass()
public void setCurrentColStyleClass(java.lang.String value)
public java.lang.String getCurrentHeaderStyleClass()
public void setCurrentHeaderStyleClass(java.lang.String value)
public java.lang.String getCurrentRowStyleClass()
public void setCurrentRowStyleClass(java.lang.String value)
public java.lang.String getInvalidCellStyleClass()
public void setInvalidCellStyleClass(java.lang.String value)
public java.lang.String getNoWordWrapStyleClass()
public void setNoWordWrapStyleClass(java.lang.String value)
public java.lang.String getPlaceholderCellStyleClass()
public void setPlaceholderCellStyleClass(java.lang.String value)
public java.lang.String getReadOnlyCellStyleClass()
public void setReadOnlyCellStyleClass(java.lang.String value)
public java.lang.String getExtender()
public void setExtender(java.lang.String extender)
public void setCaseSensitiveSort(boolean value)
public boolean isCaseSensitiveSort()
public java.lang.Integer getNullSortOrder()
public void setNullSortOrder(java.lang.Integer value)
public void setMaxRows(java.lang.Integer value)
public java.lang.Integer getMaxRows()
public void setMinRows(java.lang.Integer value)
public java.lang.Integer getMinRows()
public void setMaxCols(java.lang.Integer value)
public java.lang.Integer getMaxCols()
public void setMinCols(java.lang.Integer value)
public java.lang.Integer getMinCols()
public void setFixedRows(java.lang.Integer value)
public java.lang.Integer getFixedRows()
public void setFixedRowsBottom(java.lang.Integer value)
public java.lang.Integer getFixedRowsBottom()
public void setFixedCols(java.lang.Integer value)
public java.lang.Integer getFixedCols()
public java.lang.String getLocale()
public void setLocale(java.lang.String locale)
public void setSelectionMode(java.lang.String value)
public java.lang.String getSelectionMode()
public java.lang.Integer getSelectedColumn()
public void setSelectedColumn(java.lang.Integer col)
col - public java.lang.Integer getSelectedLastColumn()
public void setSelectedLastColumn(java.lang.Integer col)
col - public java.lang.Integer getSelectedRow()
public java.lang.Integer getSelectedLastRow()
public void setSelectedRow(java.lang.Integer row)
row - public void setSelectedLastRow(java.lang.Integer row)
row - public java.lang.Integer getWidth()
public void setWidth(java.lang.Integer value)
public java.lang.Integer getHeight()
public void setHeight(java.lang.Integer value)
value - public java.lang.Object getValue()
getValue in interface javax.faces.component.ValueHoldergetValue in class javax.faces.component.UIInputpublic java.util.List getFilteredValue()
public void setFilteredValue(java.util.List filteredValue)
filteredValue - the List to storepublic void setValue(java.lang.Object value)
Sheet. This value must be a java.util.List at this time.setValue in interface javax.faces.component.ValueHoldersetValue in class javax.faces.component.UIInputvalue - the new valuepublic void setStyle(java.lang.String value)
value - public java.lang.String getStyle()
protected javax.el.ValueExpression getRowHeaderValueExpression()
public java.lang.String getVar()
public void setVar(java.lang.String var)
var - The new request-scope attribute namepublic void saveSortByColumn(java.lang.String columnId)
columnId - ID of the column by which the sheet is currently sorted.public java.lang.String getSortOrder()
public void setSortOrder(java.lang.String sortOrder)
sortOrder - public java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String value)
value - Copyright © 2011–2021. All rights reserved.