Class Sheet
- java.lang.Object
-
- javax.faces.component.UIComponent
-
- javax.faces.component.UIComponentBase
-
- javax.faces.component.UIOutput
-
- javax.faces.component.UIInput
-
- org.primefaces.extensions.component.sheet.Sheet
-
- All Implemented Interfaces:
java.util.EventListener,javax.faces.component.behavior.ClientBehaviorHolder,javax.faces.component.EditableValueHolder,javax.faces.component.PartialStateHolder,javax.faces.component.StateHolder,javax.faces.component.TransientStateHolder,javax.faces.component.ValueHolder,javax.faces.event.ComponentSystemEventListener,javax.faces.event.FacesListener,javax.faces.event.SystemEventListenerHolder,org.primefaces.component.api.Widget
public class Sheet extends javax.faces.component.UIInputSpreadsheet component wrappering the Handsontable jQuery UI component.- Since:
- 6.2
- Author:
- Mark Lassiter / Melloware
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMPONENT_FAMILYstatic java.lang.StringCOMPONENT_TYPEstatic java.lang.StringEVENT_CELL_SELECTstatic java.lang.StringEVENT_CHANGEstatic java.lang.StringEVENT_COLUMN_SELECTstatic java.lang.StringEVENT_FILTERstatic java.lang.StringEVENT_ROW_SELECTstatic java.lang.StringEVENT_SORT-
Fields inherited from class javax.faces.component.UIInput
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 Summary
Constructors Constructor Description Sheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendUpdateEvent(java.lang.Object rowKey, int colIndex, java.lang.Object rowData, java.lang.Object oldValue, java.lang.Object newValue)Appends an update eventvoidcommitUpdates()Invoke this method to commit the most recent set of ajax updates and restart the tracking of changes.protected org.primefaces.model.SortOrderconvertSortOrder()Convert to PF SortOrder enum since we are leveraging PF sorting code.java.lang.StringgetActiveHeaderStyleClass()java.util.List<SheetColumn>getColumns()The list of child columns.java.lang.StringgetCommentedCellStyleClass()java.lang.StringgetCurrentColStyleClass()java.lang.StringgetCurrentHeaderStyleClass()java.lang.StringgetCurrentRowStyleClass()java.lang.StringgetDefaultEventName()java.lang.StringgetEmptyMessage()java.lang.StringgetErrorMessage()The error message to display when the sheet is in error.java.util.Collection<java.lang.String>getEventNames()java.lang.StringgetExtender()java.lang.StringgetFamily()java.util.ListgetFilteredValue()Holds the filtered and sorted List of values.java.lang.IntegergetFixedCols()java.lang.IntegergetFixedRows()java.lang.IntegergetFixedRowsBottom()java.lang.StringgetFocusId()The focusId value.java.lang.IntegergetHeight()The height of the sheet.java.lang.StringgetInvalidCellStyleClass()java.lang.StringgetInvalidDataValue()Generates the bad data var value for this sheet.java.util.List<SheetInvalidUpdate>getInvalidUpdates()The list of invalid updatesjava.lang.StringgetLocale()java.lang.ObjectgetLocalValue(java.lang.String rowKey, int col)Retrieves the submitted value for the rowKey and col.intgetMappedColumn(int renderCol)Maps the rendered column index to the real column index.java.lang.IntegergetMaxCols()java.lang.IntegergetMaxRows()java.lang.IntegergetMinCols()java.lang.IntegergetMinRows()java.lang.StringgetNoWordWrapStyleClass()java.lang.IntegergetNullSortOrder()java.lang.StringgetPlaceholderCellStyleClass()java.lang.StringgetReadOnlyCellStyleClass()java.util.List<SheetColumn>getRenderedColumns()The list of rendered child columns.intgetRenderIndexFromRealIdx(int realIdx)Provides the render column index based on the real indexjava.lang.StringgetRenderValueForCell(javax.faces.context.FacesContext context, java.lang.String rowKey, int col)Gets the render string for the value the given cell.intgetRowCount()The number of rows in the value list.protected java.lang.StringgetRowHeaderValueAsString(javax.faces.context.FacesContext context)Gets the row header text value as a string for use in javascriptprotected javax.el.ValueExpressiongetRowHeaderValueExpression()Gets the rowHeader value expression definedprotected java.lang.ObjectgetRowKeyValue(javax.faces.context.FacesContext context)Gets the rowKey for the current rowprotected java.lang.StringgetRowKeyValueAsString(java.lang.Object key)Gets the row key value as a String suitable for use in javascript rendering.protected java.lang.StringgetRowKeyValueAsString(javax.faces.context.FacesContext context)Gets the row key value as a string for the current row var.protected java.util.Map<java.lang.String,java.lang.Object>getRowMap()java.lang.StringgetRowStyleClass()java.lang.IntegergetSelectedColumn()The currently selected column.java.lang.IntegergetSelectedLastColumn()The currently selected column.java.lang.IntegergetSelectedLastRow()The currently selected row.java.lang.IntegergetSelectedRow()The currently selected row.java.lang.StringgetSelection()The selection value.java.lang.StringgetSelectionMode()java.lang.ObjectgetSortBy()Please note: The return type needs to beObject.intgetSortColRenderIndex()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.StringgetSortOrder()The sort directionjava.lang.StringgetStretchH()java.lang.StringgetStyle()The style valuejava.lang.StringgetStyleClass()java.lang.ObjectgetSubmittedValue()java.lang.StringgetSubmittedValue(java.lang.String rowKey, int col)Retrieves the submitted value for the row and col.java.lang.StringgetTabindex()java.util.List<SheetUpdate>getUpdates()A list of updates from the last submission or ajax event.java.lang.ObjectgetValue()Return the value of the Sheet.java.lang.ObjectgetValueForCell(javax.faces.context.FacesContext context, java.lang.String rowKey, int col)Gets the object value of the row and col specified.java.lang.StringgetVar()Return the request-scope attribute under which the data object for the current row will be exposed when iterating.java.lang.IntegergetWidth()booleanisAllowTabOffSheet()booleanisCaseSensitiveSort()booleanisHasStyledCells()Returns true if any of the columns contain conditional styling.booleanisMovableCols()booleanisMovableRows()booleanisReadOnly()booleanisResizableCols()booleanisResizableRows()booleanisShowColumnHeaders()booleanisShowRowHeaders()protected booleanmatchesFilter()Evaluates the specified item value against the column filters and if they match, returns true, otherwise false.voidqueueEvent(javax.faces.event.FacesEvent event)protected voidremapFilteredList(java.util.List filteredList)Remaps the row keys in a hash map.protected voidremapRows()Remaps the row keys in a hash map.voidrenderBadUpdateScript()Adds eval scripts to update the bad data array in the sheet to render validation failures produced by the most recent ajax update attempt.voidrenderRowUpdateScript(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.voidreset()Resets all filters, sorting and submitted values.voidresetInvalidUpdates()Resets invalid updatesvoidresetSort()Resets the sorting to the originally specified values (if any)voidresetSubmitted()Resets the submitted valuesvoidrestoreState(javax.faces.context.FacesContext context, java.lang.Object state)Restores the state for the submitted, local and bad values.voidsaveSortByColumn(java.lang.String columnId)Saves the column by which the sheet is currently sorted (when the user clicks on a column).java.lang.ObjectsaveState(javax.faces.context.FacesContext context)Saves the state of the submitted and local values and the bad updates.voidsetActiveHeaderStyleClass(java.lang.String value)voidsetAllowTabOffSheet(boolean value)voidsetCaseSensitiveSort(boolean value)voidsetColumns(java.util.List<SheetColumn> columns)Updates the list of child columns.voidsetCommentedCellStyleClass(java.lang.String value)voidsetCurrentColStyleClass(java.lang.String value)voidsetCurrentHeaderStyleClass(java.lang.String value)voidsetCurrentRowStyleClass(java.lang.String value)voidsetEmptyMessage(java.lang.String value)voidsetErrorMessage(java.lang.String value)Updates the errorMessage value.voidsetExtender(java.lang.String extender)voidsetFilteredValue(java.util.List filteredValue)Sets the filtered list.voidsetFixedCols(java.lang.Integer value)voidsetFixedRows(java.lang.Integer value)voidsetFixedRowsBottom(java.lang.Integer value)voidsetFocusId(java.lang.String focusId)Updates the focusId value.voidsetHeight(java.lang.Integer value)Updates the heightvoidsetInvalidCellStyleClass(java.lang.String value)voidsetLocale(java.lang.String locale)voidsetLocalValue(java.lang.String rowKey, int col, java.lang.Object value)Updates a local value.voidsetMaxCols(java.lang.Integer value)voidsetMaxRows(java.lang.Integer value)voidsetMinCols(java.lang.Integer value)voidsetMinRows(java.lang.Integer value)voidsetMovableCols(boolean value)voidsetMovableRows(boolean value)voidsetNoWordWrapStyleClass(java.lang.String value)voidsetNullSortOrder(java.lang.Integer value)voidsetPlaceholderCellStyleClass(java.lang.String value)voidsetReadOnly(boolean value)voidsetReadOnlyCellStyleClass(java.lang.String value)voidsetResizableCols(boolean value)voidsetResizableRows(boolean value)voidsetRowStyleClass(java.lang.String styleClass)voidsetRowVar(javax.faces.context.FacesContext context, java.lang.String rowKey)Updates the row var for iterations over the list.voidsetSelectedColumn(java.lang.Integer col)Updates the selected column.voidsetSelectedLastColumn(java.lang.Integer col)Updates the selected column.voidsetSelectedLastRow(java.lang.Integer row)Updates the selected row.voidsetSelectedRow(java.lang.Integer row)Updates the selected row.voidsetSelection(java.lang.String selection)Updates the selection value.voidsetSelectionMode(java.lang.String value)voidsetShowColumnHeaders(boolean value)voidsetShowRowHeaders(boolean value)voidsetSortBy(java.lang.Object sortBy)voidsetSortOrder(java.lang.String sortOrder)Update the sort directionvoidsetStretchH(java.lang.String value)voidsetStyle(java.lang.String value)Update the style value for the componentvoidsetStyleClass(java.lang.String styleClass)voidsetSubmittedValue(java.lang.Object submittedValue)voidsetSubmittedValue(java.lang.String rowKey, int col, java.lang.String value)Updates a submitted value.voidsetTabindex(java.lang.String tabindex)voidsetValue(java.lang.Object value)Set the value of theSheet.voidsetVar(java.lang.String var)Set the request-scope attribute under which the data object for the current row wil be exposed when iterating.voidsetWidth(java.lang.Integer value)java.util.List<java.lang.Object>sortAndFilter()Sorts and filters the datavoidupdateColumnMappings()Updates the column mappings based on the rendered attributevoidupdateModel(javax.faces.context.FacesContext context)Override to update model with local values.voidvalidate(javax.faces.context.FacesContext context)Converts each submitted value into a local value and stores it back in the hash.-
Methods inherited from class javax.faces.component.UIInput
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, validateValue
-
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
-
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, 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, unsubscribeFromEvent
-
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
-
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
addClientBehavior, getClientBehaviors
-
-
-
-
Field Detail
-
EVENT_CELL_SELECT
public static final java.lang.String EVENT_CELL_SELECT
- See Also:
- Constant Field Values
-
EVENT_CHANGE
public static final java.lang.String EVENT_CHANGE
- See Also:
- Constant Field Values
-
EVENT_SORT
public static final java.lang.String EVENT_SORT
- See Also:
- Constant Field Values
-
EVENT_FILTER
public static final java.lang.String EVENT_FILTER
- See Also:
- Constant Field Values
-
EVENT_COLUMN_SELECT
public static final java.lang.String EVENT_COLUMN_SELECT
- See Also:
- Constant Field Values
-
EVENT_ROW_SELECT
public static final java.lang.String EVENT_ROW_SELECT
- See Also:
- Constant Field Values
-
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
- See Also:
- Constant Field Values
-
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFamily
public java.lang.String getFamily()
-
getEventNames
public java.util.Collection<java.lang.String> getEventNames()
- Specified by:
getEventNamesin interfacejavax.faces.component.behavior.ClientBehaviorHolder- Overrides:
getEventNamesin classjavax.faces.component.UIComponentBase
-
getDefaultEventName
public java.lang.String getDefaultEventName()
- Specified by:
getDefaultEventNamein interfacejavax.faces.component.behavior.ClientBehaviorHolder- Overrides:
getDefaultEventNamein classjavax.faces.component.UIComponentBase
-
queueEvent
public void queueEvent(javax.faces.event.FacesEvent event)
- Overrides:
queueEventin classjavax.faces.component.UIComponentBase
-
getColumns
public java.util.List<SheetColumn> getColumns()
The list of child columns.
-
getRenderedColumns
public java.util.List<SheetColumn> getRenderedColumns()
The list of rendered child columns.
-
setColumns
public void setColumns(java.util.List<SheetColumn> columns)
Updates the list of child columns.
-
getInvalidUpdates
public java.util.List<SheetInvalidUpdate> getInvalidUpdates()
The list of invalid updates
-
resetSubmitted
public void resetSubmitted()
Resets the submitted values
-
resetSort
public void resetSort()
Resets the sorting to the originally specified values (if any)
-
resetInvalidUpdates
public void resetInvalidUpdates()
Resets invalid updates
-
reset
public void reset()
Resets all filters, sorting and submitted values.
-
setSubmittedValue
public void setSubmittedValue(java.lang.String rowKey, int col, java.lang.String value)Updates a submitted value.
-
getSubmittedValue
public java.lang.String getSubmittedValue(java.lang.String rowKey, int col)Retrieves the submitted value for the row and col.
-
setLocalValue
public void setLocalValue(java.lang.String rowKey, int col, java.lang.Object value)Updates a local value.
-
getLocalValue
public java.lang.Object getLocalValue(java.lang.String rowKey, int col)Retrieves the submitted value for the rowKey and col.
-
setRowVar
public void setRowVar(javax.faces.context.FacesContext context, java.lang.String rowKey)Updates the row var for iterations over the list. The var value will be updated to the value for the specified rowKey.- Parameters:
context- the FacesContext against which to the row var is set. Passed for performancerowKey- the rowKey string
-
getRowMap
protected java.util.Map<java.lang.String,java.lang.Object> getRowMap()
-
getValueForCell
public 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. If a local value exists, that is returned, otherwise the actual value is return.
-
getRenderValueForCell
public 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. Applys the available converters to convert the value.
-
getRowHeaderValueAsString
protected java.lang.String getRowHeaderValueAsString(javax.faces.context.FacesContext context)
Gets the row header text value as a string for use in javascript
-
getSortedValues
public java.util.List<java.lang.Object> getSortedValues()
The sorted list of values.
-
getSortColRenderIndex
public int getSortColRenderIndex()
Gets the rendered col index of the column corresponding to the current sortBy. This is used to keep track of the current sort column in the page.
-
matchesFilter
protected boolean matchesFilter()
Evaluates the specified item value against the column filters and if they match, returns true, otherwise false. If no filterMatchMode is given on a column than the "contains" mode is used. Otherwise the following filterMatchMode values are possible: - startsWith: Checks if column value starts with the filter value. - endsWith: Checks if column value ends with the filter value. - contains: Checks if column value contains the filter value. - exact: Checks if string representations of column value and filter value are same.
-
sortAndFilter
public java.util.List<java.lang.Object> sortAndFilter()
Sorts and filters the data
-
remapFilteredList
protected void remapFilteredList(java.util.List filteredList)
Remaps the row keys in a hash map.
-
remapRows
protected void remapRows()
Remaps the row keys in a hash map.
-
getRowKeyValue
protected java.lang.Object getRowKeyValue(javax.faces.context.FacesContext context)
Gets the rowKey for the current row- Parameters:
context- the faces context- Returns:
- a row key value or null if the expression is not set
-
getRowKeyValueAsString
protected java.lang.String getRowKeyValueAsString(java.lang.Object key)
Gets the row key value as a String suitable for use in javascript rendering.
-
getRowKeyValueAsString
protected java.lang.String getRowKeyValueAsString(javax.faces.context.FacesContext context)
Gets the row key value as a string for the current row var.
-
convertSortOrder
protected org.primefaces.model.SortOrder convertSortOrder()
Convert to PF SortOrder enum since we are leveraging PF sorting code.
-
validate
public void validate(javax.faces.context.FacesContext context)
Converts each submitted value into a local value and stores it back in the hash. If all values convert without error, then the component is valid, and we can proceed to the processUpdates.- Overrides:
validatein classjavax.faces.component.UIInput
-
updateModel
public void updateModel(javax.faces.context.FacesContext context)
Override to update model with local values. Note that this is where things can be fragile in that we can successfully update some values and fail on others. There is no clean way to roll back the updates, but we also need to fail processing. Consider keeping old values as we update (need for event anyhow) and if there is a failure attempt to roll back by updating successful model updates with the old value. This may not all be necessary.- Overrides:
updateModelin classjavax.faces.component.UIInput
-
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
Saves the state of the submitted and local values and the bad updates.- Specified by:
saveStatein interfacejavax.faces.component.StateHolder- Overrides:
saveStatein classjavax.faces.component.UIInput
-
restoreState
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)Restores the state for the submitted, local and bad values.- Specified by:
restoreStatein interfacejavax.faces.component.StateHolder- Overrides:
restoreStatein classjavax.faces.component.UIInput
-
getSelection
public java.lang.String getSelection()
The selection value.- Returns:
- the selection
-
setSelection
public void setSelection(java.lang.String selection)
Updates the selection value.- Parameters:
selection- the selection to set
-
getSubmittedValue
public java.lang.Object getSubmittedValue()
- Specified by:
getSubmittedValuein interfacejavax.faces.component.EditableValueHolder- Overrides:
getSubmittedValuein classjavax.faces.component.UIInput
-
setSubmittedValue
public void setSubmittedValue(java.lang.Object submittedValue)
- Specified by:
setSubmittedValuein interfacejavax.faces.component.EditableValueHolder- Overrides:
setSubmittedValuein classjavax.faces.component.UIInput
-
getUpdates
public java.util.List<SheetUpdate> getUpdates()
A list of updates from the last submission or ajax event.- Returns:
- the editEvent
-
isHasStyledCells
public boolean isHasStyledCells()
Returns true if any of the columns contain conditional styling.
-
getMappedColumn
public int getMappedColumn(int renderCol)
Maps the rendered column index to the real column index.- Parameters:
renderCol- the rendered index- Returns:
- the mapped index
-
getRenderIndexFromRealIdx
public int getRenderIndexFromRealIdx(int realIdx)
Provides the render column index based on the real index
-
updateColumnMappings
public void updateColumnMappings()
Updates the column mappings based on the rendered attribute
-
getRowCount
public int getRowCount()
The number of rows in the value list.
-
getFocusId
public java.lang.String getFocusId()
The focusId value.- Returns:
- the focusId
-
setFocusId
public void setFocusId(java.lang.String focusId)
Updates the focusId value.- Parameters:
focusId- the focusId to set
-
commitUpdates
public void commitUpdates()
Invoke this method to commit the most recent set of ajax updates and restart the tracking of changes. Use this when you have processes the updates to the model and are confident that any changes made to this point can be cleared (likely because you have persisted those changes).
-
getInvalidDataValue
public java.lang.String getInvalidDataValue()
Generates the bad data var value for this sheet.
-
renderRowUpdateScript
public 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.- Parameters:
context- the FacesContextdirtyRows- the set of dirty rows
-
renderBadUpdateScript
public 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.
-
appendUpdateEvent
public void appendUpdateEvent(java.lang.Object rowKey, int colIndex, java.lang.Object rowData, java.lang.Object oldValue, java.lang.Object newValue)Appends an update event
-
setStyleClass
public void setStyleClass(java.lang.String styleClass)
-
getStyleClass
public java.lang.String getStyleClass()
-
setStretchH
public void setStretchH(java.lang.String value)
-
getStretchH
public java.lang.String getStretchH()
-
setEmptyMessage
public void setEmptyMessage(java.lang.String value)
-
getEmptyMessage
public java.lang.String getEmptyMessage()
-
getSortBy
public java.lang.Object getSortBy()
Please note: The return type needs to beObject. Otherwise, evaluating thesortByattribute as a value expression forces it into a string, and strings are sorted differently than numbers.- Returns:
- The ID of the column to sort by.
-
setSortBy
public void setSortBy(java.lang.Object sortBy)
-
setShowColumnHeaders
public void setShowColumnHeaders(boolean value)
-
isShowColumnHeaders
public boolean isShowColumnHeaders()
-
setShowRowHeaders
public void setShowRowHeaders(boolean value)
-
isShowRowHeaders
public boolean isShowRowHeaders()
-
setResizableRows
public void setResizableRows(boolean value)
-
isResizableRows
public boolean isResizableRows()
-
setResizableCols
public void setResizableCols(boolean value)
-
isResizableCols
public boolean isResizableCols()
-
setMovableRows
public void setMovableRows(boolean value)
-
isMovableRows
public boolean isMovableRows()
-
setMovableCols
public void setMovableCols(boolean value)
-
isMovableCols
public boolean isMovableCols()
-
setRowStyleClass
public void setRowStyleClass(java.lang.String styleClass)
-
getRowStyleClass
public java.lang.String getRowStyleClass()
-
getActiveHeaderStyleClass
public java.lang.String getActiveHeaderStyleClass()
-
setReadOnly
public void setReadOnly(boolean value)
-
isReadOnly
public boolean isReadOnly()
-
setActiveHeaderStyleClass
public void setActiveHeaderStyleClass(java.lang.String value)
-
getCommentedCellStyleClass
public java.lang.String getCommentedCellStyleClass()
-
setCommentedCellStyleClass
public void setCommentedCellStyleClass(java.lang.String value)
-
getCurrentColStyleClass
public java.lang.String getCurrentColStyleClass()
-
setCurrentColStyleClass
public void setCurrentColStyleClass(java.lang.String value)
-
getCurrentHeaderStyleClass
public java.lang.String getCurrentHeaderStyleClass()
-
setCurrentHeaderStyleClass
public void setCurrentHeaderStyleClass(java.lang.String value)
-
getCurrentRowStyleClass
public java.lang.String getCurrentRowStyleClass()
-
setCurrentRowStyleClass
public void setCurrentRowStyleClass(java.lang.String value)
-
getInvalidCellStyleClass
public java.lang.String getInvalidCellStyleClass()
-
setInvalidCellStyleClass
public void setInvalidCellStyleClass(java.lang.String value)
-
getNoWordWrapStyleClass
public java.lang.String getNoWordWrapStyleClass()
-
setNoWordWrapStyleClass
public void setNoWordWrapStyleClass(java.lang.String value)
-
getPlaceholderCellStyleClass
public java.lang.String getPlaceholderCellStyleClass()
-
setPlaceholderCellStyleClass
public void setPlaceholderCellStyleClass(java.lang.String value)
-
getReadOnlyCellStyleClass
public java.lang.String getReadOnlyCellStyleClass()
-
setReadOnlyCellStyleClass
public void setReadOnlyCellStyleClass(java.lang.String value)
-
setAllowTabOffSheet
public void setAllowTabOffSheet(boolean value)
-
isAllowTabOffSheet
public boolean isAllowTabOffSheet()
-
getTabindex
public java.lang.String getTabindex()
-
setTabindex
public void setTabindex(java.lang.String tabindex)
-
getExtender
public java.lang.String getExtender()
-
setExtender
public void setExtender(java.lang.String extender)
-
setCaseSensitiveSort
public void setCaseSensitiveSort(boolean value)
-
isCaseSensitiveSort
public boolean isCaseSensitiveSort()
-
getNullSortOrder
public java.lang.Integer getNullSortOrder()
-
setNullSortOrder
public void setNullSortOrder(java.lang.Integer value)
-
setMaxRows
public void setMaxRows(java.lang.Integer value)
-
getMaxRows
public java.lang.Integer getMaxRows()
-
setMinRows
public void setMinRows(java.lang.Integer value)
-
getMinRows
public java.lang.Integer getMinRows()
-
setMaxCols
public void setMaxCols(java.lang.Integer value)
-
getMaxCols
public java.lang.Integer getMaxCols()
-
setMinCols
public void setMinCols(java.lang.Integer value)
-
getMinCols
public java.lang.Integer getMinCols()
-
setFixedRows
public void setFixedRows(java.lang.Integer value)
-
getFixedRows
public java.lang.Integer getFixedRows()
-
setFixedRowsBottom
public void setFixedRowsBottom(java.lang.Integer value)
-
getFixedRowsBottom
public java.lang.Integer getFixedRowsBottom()
-
setFixedCols
public void setFixedCols(java.lang.Integer value)
-
getFixedCols
public java.lang.Integer getFixedCols()
-
getLocale
public java.lang.String getLocale()
-
setLocale
public void setLocale(java.lang.String locale)
-
setSelectionMode
public void setSelectionMode(java.lang.String value)
-
getSelectionMode
public java.lang.String getSelectionMode()
-
getSelectedColumn
public java.lang.Integer getSelectedColumn()
The currently selected column.- Returns:
-
setSelectedColumn
public void setSelectedColumn(java.lang.Integer col)
Updates the selected column.- Parameters:
col-
-
getSelectedLastColumn
public java.lang.Integer getSelectedLastColumn()
The currently selected column.- Returns:
-
setSelectedLastColumn
public void setSelectedLastColumn(java.lang.Integer col)
Updates the selected column.- Parameters:
col-
-
getSelectedRow
public java.lang.Integer getSelectedRow()
The currently selected row.- Returns:
-
getSelectedLastRow
public java.lang.Integer getSelectedLastRow()
The currently selected row.- Returns:
-
setSelectedRow
public void setSelectedRow(java.lang.Integer row)
Updates the selected row.- Parameters:
row-
-
setSelectedLastRow
public void setSelectedLastRow(java.lang.Integer row)
Updates the selected row.- Parameters:
row-
-
getWidth
public java.lang.Integer getWidth()
-
setWidth
public void setWidth(java.lang.Integer value)
-
getHeight
public java.lang.Integer getHeight()
The height of the sheet. Note this is applied to the inner div which is why it is recommend you use this property instead of a style class.- Returns:
-
setHeight
public void setHeight(java.lang.Integer value)
Updates the height- Parameters:
value-
-
getValue
public java.lang.Object getValue()
Return the value of the Sheet. This value must be a java.util.List value at this time.- Specified by:
getValuein interfacejavax.faces.component.ValueHolder- Overrides:
getValuein classjavax.faces.component.UIInput
-
getFilteredValue
public java.util.List getFilteredValue()
Holds the filtered and sorted List of values.- Returns:
- a List of sorted and filtered values
-
setFilteredValue
public void setFilteredValue(java.util.List filteredValue)
Sets the filtered list.- Parameters:
filteredValue- the List to store
-
setValue
public void setValue(java.lang.Object value)
Set the value of theSheet. This value must be a java.util.List at this time.- Specified by:
setValuein interfacejavax.faces.component.ValueHolder- Overrides:
setValuein classjavax.faces.component.UIInput- Parameters:
value- the new value
-
setStyle
public void setStyle(java.lang.String value)
Update the style value for the component- Parameters:
value-
-
getStyle
public java.lang.String getStyle()
The style value- Returns:
- the style value
-
getRowHeaderValueExpression
protected javax.el.ValueExpression getRowHeaderValueExpression()
Gets the rowHeader value expression defined- Returns:
- a value expression for Row Header or null if the expression is not set
-
getVar
public java.lang.String getVar()
Return the request-scope attribute under which the data object for the current row will be exposed when iterating. This property is not enabled for value binding expressions.
-
setVar
public 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.- Parameters:
var- The new request-scope attribute name
-
saveSortByColumn
public void saveSortByColumn(java.lang.String columnId)
Saves the column by which the sheet is currently sorted (when the user clicks on a column).- Parameters:
columnId- ID of the column by which the sheet is currently sorted.
-
getSortOrder
public java.lang.String getSortOrder()
The sort direction- Returns:
-
setSortOrder
public void setSortOrder(java.lang.String sortOrder)
Update the sort direction- Parameters:
sortOrder-
-
getErrorMessage
public java.lang.String getErrorMessage()
The error message to display when the sheet is in error.- Returns:
-
setErrorMessage
public void setErrorMessage(java.lang.String value)
Updates the errorMessage value.- Parameters:
value-
-
-