Class 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.UIInput
    Spreadsheet 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.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  
      • 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
      • Fields inherited from class javax.faces.component.UIComponent

        ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
      • Fields inherited from interface org.primefaces.component.api.Widget

        ATTR_WIDGET_VAR_PATTERN, CALLBACK_POST_CONSTRUCT, CALLBACK_POST_REFRESH, CALLBACK_PRE_DESTROY
    • Constructor Summary

      Constructors 
      Constructor Description
      Sheet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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​(java.lang.Object key)
      Gets the row key value as a String suitable for use in javascript rendering.
      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.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.lang.String getTabindex()  
      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 isAllowTabOffSheet()  
      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 setAllowTabOffSheet​(boolean 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 setTabindex​(java.lang.String tabindex)  
      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.
      • 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
      • Methods inherited from interface javax.faces.component.ValueHolder

        getConverter, getLocalValue, setConverter
      • Methods inherited from interface org.primefaces.component.api.Widget

        resolveWidgetVar, resolveWidgetVar
    • Constructor Detail

      • Sheet

        public Sheet()
    • Method Detail

      • getFamily

        public java.lang.String getFamily()
      • getEventNames

        public java.util.Collection<java.lang.String> getEventNames()
        Specified by:
        getEventNames in interface javax.faces.component.behavior.ClientBehaviorHolder
        Overrides:
        getEventNames in class javax.faces.component.UIComponentBase
      • getDefaultEventName

        public java.lang.String getDefaultEventName()
        Specified by:
        getDefaultEventName in interface javax.faces.component.behavior.ClientBehaviorHolder
        Overrides:
        getDefaultEventName in class javax.faces.component.UIComponentBase
      • queueEvent

        public void queueEvent​(javax.faces.event.FacesEvent event)
        Overrides:
        queueEvent in class javax.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 performance
        rowKey - 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:
        validate in class javax.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:
        updateModel in class javax.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:
        saveState in interface javax.faces.component.StateHolder
        Overrides:
        saveState in class javax.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:
        restoreState in interface javax.faces.component.StateHolder
        Overrides:
        restoreState in class javax.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:
        getSubmittedValue in interface javax.faces.component.EditableValueHolder
        Overrides:
        getSubmittedValue in class javax.faces.component.UIInput
      • setSubmittedValue

        public void setSubmittedValue​(java.lang.Object submittedValue)
        Specified by:
        setSubmittedValue in interface javax.faces.component.EditableValueHolder
        Overrides:
        setSubmittedValue in class javax.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 FacesContext
        dirtyRows - 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 be Object. Otherwise, evaluating the sortBy attribute 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:
        getValue in interface javax.faces.component.ValueHolder
        Overrides:
        getValue in class javax.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 the Sheet. This value must be a java.util.List at this time.
        Specified by:
        setValue in interface javax.faces.component.ValueHolder
        Overrides:
        setValue in class javax.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 -