Class SheetColumn

java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
org.primefaces.extensions.component.sheet.SheetColumn
All Implemented Interfaces:
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

public class SheetColumn extends javax.faces.component.UIInput implements javax.faces.component.behavior.ClientBehaviorHolder
JSF Component used to represent a column in the Sheet component.
Since:
6.2
Author:
Mark Lassiter / Melloware
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    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
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
     
    the Handsontable column type.
    The column width
     
     
     
    The filterBy expression
    The filter match mode submitted by the user
    Collection<javax.faces.model.SelectItem>
    The filterOptions expression
    The filter value submitted by the user
    The fixed column count.
     
     
     
     
     
     
    Get the parent sheet
    The style class for the cell.
     
    When asked for the value, return the local value if available, otherwise the sheet value.
    boolean
     
    boolean
     
    boolean
     
    boolean
    Flag indicating whether this column is read only.
    boolean
    Flag indicating whether this cell is read only. the var reference will be available.
     
    boolean
    We are valid if the sheet is valid, we do not track at the individual column.
    boolean
     
     
    void
    processDecodes(javax.faces.context.FacesContext context)
    Sheet handles decoding of all submitted values
    void
    processUpdates(javax.faces.context.FacesContext context)
    Sheet handles updating of model
    void
    processValidators(javax.faces.context.FacesContext context)
    Don't do anything when called by inherited behavior.
    void
    Reset the local value.
    void
     
    void
    setAutoCompleteStrict(boolean value)
     
    void
     
    void
     
    void
    Updates the column type.
    void
    Updates the column width
    void
    setDateFormat(String _dateFormat)
     
    void
    setDatePickerConfig(String _datePickerConfig)
     
    void
    setFilterBy(Object filterBy)
    Update the filter by field
    void
    setFilterMatchMode(String filterMatchMode)
    Update the filter match mode for this column
    void
    setFilterOptions(Collection<javax.faces.model.SelectItem> filterOptions)
    Update the filterOptions field
    void
    setFilterValue(String filterValue)
    Update the filter value for this column
    void
    Updates the fixed columns count.
    void
     
    void
    setNumericPattern(String _numericPattern)
     
    void
    setOnvalidate(String _onvalidate)
     
    void
    setPasswordHashLength(Integer _passwordHashLength)
     
    void
    setPasswordHashSymbol(String _passwordHashSymbol)
     
    void
    setReadOnly(boolean value)
    Updates the readOnly property
    void
    setReadonlyCell(boolean value)
    Updates the readOnly property of the cell
    void
    setSelectItems(Object selectItems)
     
    void
    setSheet(Sheet sheet)
    Updates the sheet reference to work around getParent sometimes returning null.
    void
    Update the style class for the cell.
    void
    setTimeFormat(String _timeFormat)
     
    void
    setTrimWhitespace(boolean value)
     
    void
    setValid(boolean valid)
    when we become valid, invalidate the whole sheet.
    void
    Ignore attempts to set the local value for this column, again done by parent.
    void
    setVisible(boolean value)
     
    void
    setWordWrap(boolean value)
     
    void
    validate(javax.faces.context.FacesContext context)
    Process all validators (skip normal UIInput behavior)
    protected boolean
    validateRequired(javax.faces.context.FacesContext context, Object newValue)
    Validates the value against the required flags on this column.

    Methods inherited from class javax.faces.component.UIInput

    addValidator, addValueChangeListener, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, markInitialState, removeValidator, removeValueChangeListener, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValidator, setValidatorMessage, setValueChangeListener, updateModel, 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, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, 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, getDefaultEventName, getEventNames

    Methods inherited from interface javax.faces.component.ValueHolder

    getConverter, getLocalValue, setConverter
  • Field Details

  • Constructor Details

    • SheetColumn

      public SheetColumn()
      Default constructor
  • Method Details

    • getFamily

      public String getFamily()
      Overrides:
      getFamily in class javax.faces.component.UIInput
    • setHeaderText

      public void setHeaderText(String value)
      Updates the fixed columns count.
      Parameters:
      value -
    • getHeaderText

      public String getHeaderText()
      The fixed column count.
      Returns:
    • setReadOnly

      public void setReadOnly(boolean value)
      Updates the readOnly property
      Parameters:
      value -
    • isReadOnly

      public boolean isReadOnly()
      Flag indicating whether this column is read only.
      Returns:
      true if read only, otherwise false
    • setReadonlyCell

      public void setReadonlyCell(boolean value)
      Updates the readOnly property of the cell
      Parameters:
      value -
    • isReadonlyCell

      public boolean isReadonlyCell()
      Flag indicating whether this cell is read only. the var reference will be available.
      Returns:
      true if read only, otherwise false
    • setColWidth

      public void setColWidth(Integer value)
      Updates the column width
      Parameters:
      value -
    • getColWidth

      public Integer getColWidth()
      The column width
      Returns:
    • setColType

      public void setColType(String value)
      Updates the column type. Possible values are: text, numeric, date, checkbox, autocomplete, handsontable.
      Parameters:
      value -
    • getColType

      public String getColType()
      the Handsontable column type.
    • isAutoCompleteAllowInvalid

      public boolean isAutoCompleteAllowInvalid()
    • setAutoCompleteAllowInvalid

      public void setAutoCompleteAllowInvalid(boolean value)
    • isAutoCompleteStrict

      public boolean isAutoCompleteStrict()
    • setAutoCompleteStrict

      public void setAutoCompleteStrict(boolean value)
    • isAutoCompleteTrimDropdown

      public boolean isAutoCompleteTrimDropdown()
    • setAutoCompleteTrimDropdown

      public void setAutoCompleteTrimDropdown(boolean value)
    • setAutoCompleteVisibleRows

      public void setAutoCompleteVisibleRows(Integer value)
    • getAutoCompleteVisibleRows

      public Integer getAutoCompleteVisibleRows()
    • getSelectItems

      public Object getSelectItems()
    • setSelectItems

      public void setSelectItems(Object selectItems)
    • getPasswordHashLength

      public Integer getPasswordHashLength()
    • setPasswordHashLength

      public void setPasswordHashLength(Integer _passwordHashLength)
    • setPasswordHashSymbol

      public void setPasswordHashSymbol(String _passwordHashSymbol)
    • getPasswordHashSymbol

      public String getPasswordHashSymbol()
    • setNumericPattern

      public void setNumericPattern(String _numericPattern)
    • getNumericPattern

      public String getNumericPattern()
    • getNumericLocale

      public String getNumericLocale()
    • setNumericLocale

      public void setNumericLocale(String locale)
    • setDateFormat

      public void setDateFormat(String _dateFormat)
    • getDateFormat

      public String getDateFormat()
    • setDatePickerConfig

      public void setDatePickerConfig(String _datePickerConfig)
    • getDatePickerConfig

      public String getDatePickerConfig()
    • setTimeFormat

      public void setTimeFormat(String _timeFormat)
    • getTimeFormat

      public String getTimeFormat()
    • setOnvalidate

      public void setOnvalidate(String _onvalidate)
    • getOnvalidate

      public String getOnvalidate()
    • setVisible

      public void setVisible(boolean value)
    • isVisible

      public boolean isVisible()
    • setWordWrap

      public void setWordWrap(boolean value)
    • isWordWrap

      public Boolean isWordWrap()
    • setTrimWhitespace

      public void setTrimWhitespace(boolean value)
    • isTrimWhitespace

      public Boolean isTrimWhitespace()
    • setStyleClass

      public void setStyleClass(String value)
      Update the style class for the cell.
      Parameters:
      value -
    • getStyleClass

      public String getStyleClass()
      The style class for the cell.
      Returns:
    • getFilterBy

      public Object getFilterBy()
      The filterBy expression
      Returns:
    • setFilterBy

      public void setFilterBy(Object filterBy)
      Update the filter by field
      Parameters:
      filterBy -
    • getFilterValue

      public String getFilterValue()
      The filter value submitted by the user
      Returns:
    • setFilterValue

      public void setFilterValue(String filterValue)
      Update the filter value for this column
      Parameters:
      filterValue -
    • getFilterMatchMode

      public String getFilterMatchMode()
      The filter match mode submitted by the user
      Returns:
    • setFilterMatchMode

      public void setFilterMatchMode(String filterMatchMode)
      Update the filter match mode for this column
      Parameters:
      filterMatchMode -
    • getFilterOptions

      public Collection<javax.faces.model.SelectItem> getFilterOptions()
      The filterOptions expression
      Returns:
    • setFilterOptions

      public void setFilterOptions(Collection<javax.faces.model.SelectItem> filterOptions)
      Update the filterOptions field
    • getSheet

      public Sheet getSheet()
      Get the parent sheet
      Returns:
    • setSheet

      public void setSheet(Sheet sheet)
      Updates the sheet reference to work around getParent sometimes returning null.
      Parameters:
      sheet - the owning sheet
    • setValue

      public void setValue(Object value)
      Ignore attempts to set the local value for this column, again done by parent.
      Specified by:
      setValue in interface javax.faces.component.ValueHolder
      Overrides:
      setValue in class javax.faces.component.UIInput
    • getValue

      public Object getValue()
      When asked for the value, return the local value if available, otherwise the sheet value.
      Specified by:
      getValue in interface javax.faces.component.ValueHolder
      Overrides:
      getValue in class javax.faces.component.UIInput
    • isValid

      public boolean isValid()
      We are valid if the sheet is valid, we do not track at the individual column.
      Specified by:
      isValid in interface javax.faces.component.EditableValueHolder
      Overrides:
      isValid in class javax.faces.component.UIInput
    • setValid

      public void setValid(boolean valid)
      when we become valid, invalidate the whole sheet.
      Specified by:
      setValid in interface javax.faces.component.EditableValueHolder
      Overrides:
      setValid in class javax.faces.component.UIInput
    • processDecodes

      public void processDecodes(javax.faces.context.FacesContext context)
      Sheet handles decoding of all submitted values
      Overrides:
      processDecodes in class javax.faces.component.UIInput
    • processUpdates

      public void processUpdates(javax.faces.context.FacesContext context)
      Sheet handles updating of model
      Overrides:
      processUpdates in class javax.faces.component.UIInput
    • resetValue

      public void resetValue()
      Reset the local value. No submitted value tracked here. Validity not tracked here.
      Specified by:
      resetValue in interface javax.faces.component.EditableValueHolder
      Overrides:
      resetValue in class javax.faces.component.UIInput
    • processValidators

      public void processValidators(javax.faces.context.FacesContext context)
      Don't do anything when called by inherited behavior. Sheet will call validate directly
      Overrides:
      processValidators in class javax.faces.component.UIInput
    • validate

      public void validate(javax.faces.context.FacesContext context)
      Process all validators (skip normal UIInput behavior)
      Overrides:
      validate in class javax.faces.component.UIInput
    • validateRequired

      protected boolean validateRequired(javax.faces.context.FacesContext context, Object newValue)
      Validates the value against the required flags on this column.
      Parameters:
      context - the FacesContext
      newValue - the new value for this column
      Returns:
      true if passes validation, otherwise valse