Class SheetColumn

  • 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

    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 java.lang.String COMPONENT_FAMILY  
      static java.lang.String COMPONENT_TYPE  
      • 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
      SheetColumn()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer getAutoCompleteVisibleRows()  
      java.lang.String getColType()
      the Handsontable column type.
      java.lang.Integer getColWidth()
      The column width
      java.lang.String getDateFormat()  
      java.lang.String getDatePickerConfig()  
      java.lang.String getFamily()  
      java.lang.Object getFilterBy()
      The filterBy expression
      java.lang.String getFilterMatchMode()
      The filter match mode submitted by the user
      java.util.Collection<javax.faces.model.SelectItem> getFilterOptions()
      The filterOptions expression
      java.lang.String getFilterValue()
      The filter value submitted by the user
      java.lang.String getHeaderText()
      The fixed column count.
      java.lang.String getNumericLocale()  
      java.lang.String getNumericPattern()  
      java.lang.String getOnvalidate()  
      java.lang.Integer getPasswordHashLength()  
      java.lang.String getPasswordHashSymbol()  
      java.lang.Object getSelectItems()  
      Sheet getSheet()
      Get the parent sheet
      java.lang.String getStyleClass()
      The style class for the cell.
      java.lang.String getTimeFormat()  
      java.lang.Object getValue()
      When asked for the value, return the local value if available, otherwise the sheet value.
      boolean isAutoCompleteAllowInvalid()  
      boolean isAutoCompleteFilter()  
      boolean isAutoCompleteStrict()  
      boolean isAutoCompleteTrimDropdown()  
      boolean isReadOnly()
      Flag indicating whether this column is read only.
      boolean isReadonlyCell()
      Flag indicating whether this cell is read only.
      java.lang.Boolean isTrimWhitespace()  
      boolean isValid()
      We are valid if the sheet is valid, we do not track at the individual column.
      boolean isVisible()  
      java.lang.Boolean isWordWrap()  
      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 resetValue()
      Reset the local value.
      void setAutoCompleteAllowInvalid​(boolean value)  
      void setAutoCompleteFilter​(boolean value)  
      void setAutoCompleteStrict​(boolean value)  
      void setAutoCompleteTrimDropdown​(boolean value)  
      void setAutoCompleteVisibleRows​(java.lang.Integer value)  
      void setColType​(java.lang.String value)
      Updates the column type.
      void setColWidth​(java.lang.Integer value)
      Updates the column width
      void setDateFormat​(java.lang.String _dateFormat)  
      void setDatePickerConfig​(java.lang.String _datePickerConfig)  
      void setFilterBy​(java.lang.Object filterBy)
      Update the filter by field
      void setFilterMatchMode​(java.lang.String filterMatchMode)
      Update the filter match mode for this column
      void setFilterOptions​(java.util.Collection<javax.faces.model.SelectItem> filterOptions)
      Update the filterOptions field
      void setFilterValue​(java.lang.String filterValue)
      Update the filter value for this column
      void setHeaderText​(java.lang.String value)
      Updates the fixed columns count.
      void setNumericLocale​(java.lang.String locale)  
      void setNumericPattern​(java.lang.String _numericPattern)  
      void setOnvalidate​(java.lang.String _onvalidate)  
      void setPasswordHashLength​(java.lang.Integer _passwordHashLength)  
      void setPasswordHashSymbol​(java.lang.String _passwordHashSymbol)  
      void setReadOnly​(boolean value)
      Updates the readOnly property
      void setReadonlyCell​(boolean value)
      Updates the readOnly property of the cell
      void setSelectItems​(java.lang.Object selectItems)  
      void setSheet​(Sheet sheet)
      Updates the sheet reference to work around getParent sometimes returning null.
      void setStyleClass​(java.lang.String value)
      Update the style class for the cell.
      void setTimeFormat​(java.lang.String _timeFormat)  
      void setTrimWhitespace​(boolean value)  
      void setValid​(boolean valid)
      when we become valid, invalidate the whole sheet.
      void setValue​(java.lang.Object value)
      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, java.lang.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
    • Constructor Detail

      • SheetColumn

        public SheetColumn()
        Default constructor
    • Method Detail

      • getFamily

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

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

        public java.lang.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​(java.lang.Integer value)
        Updates the column width
        Parameters:
        value -
      • getColWidth

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

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

        public java.lang.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)
      • isAutoCompleteFilter

        public boolean isAutoCompleteFilter()
      • setAutoCompleteFilter

        public void setAutoCompleteFilter​(boolean value)
      • isAutoCompleteTrimDropdown

        public boolean isAutoCompleteTrimDropdown()
      • setAutoCompleteTrimDropdown

        public void setAutoCompleteTrimDropdown​(boolean value)
      • setAutoCompleteVisibleRows

        public void setAutoCompleteVisibleRows​(java.lang.Integer value)
      • getAutoCompleteVisibleRows

        public java.lang.Integer getAutoCompleteVisibleRows()
      • getSelectItems

        public java.lang.Object getSelectItems()
      • setSelectItems

        public void setSelectItems​(java.lang.Object selectItems)
      • getPasswordHashLength

        public java.lang.Integer getPasswordHashLength()
      • setPasswordHashLength

        public void setPasswordHashLength​(java.lang.Integer _passwordHashLength)
      • setPasswordHashSymbol

        public void setPasswordHashSymbol​(java.lang.String _passwordHashSymbol)
      • getPasswordHashSymbol

        public java.lang.String getPasswordHashSymbol()
      • setNumericPattern

        public void setNumericPattern​(java.lang.String _numericPattern)
      • getNumericPattern

        public java.lang.String getNumericPattern()
      • getNumericLocale

        public java.lang.String getNumericLocale()
      • setNumericLocale

        public void setNumericLocale​(java.lang.String locale)
      • setDateFormat

        public void setDateFormat​(java.lang.String _dateFormat)
      • getDateFormat

        public java.lang.String getDateFormat()
      • setDatePickerConfig

        public void setDatePickerConfig​(java.lang.String _datePickerConfig)
      • getDatePickerConfig

        public java.lang.String getDatePickerConfig()
      • setTimeFormat

        public void setTimeFormat​(java.lang.String _timeFormat)
      • getTimeFormat

        public java.lang.String getTimeFormat()
      • setOnvalidate

        public void setOnvalidate​(java.lang.String _onvalidate)
      • getOnvalidate

        public java.lang.String getOnvalidate()
      • setVisible

        public void setVisible​(boolean value)
      • isVisible

        public boolean isVisible()
      • setWordWrap

        public void setWordWrap​(boolean value)
      • isWordWrap

        public java.lang.Boolean isWordWrap()
      • setTrimWhitespace

        public void setTrimWhitespace​(boolean value)
      • isTrimWhitespace

        public java.lang.Boolean isTrimWhitespace()
      • setStyleClass

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

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

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

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

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

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

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

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

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

        public void setFilterOptions​(java.util.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​(java.lang.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 java.lang.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,
                                           java.lang.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