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
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionthe Handsontable column type.The column widthThe filterBy expressionThe filter match mode submitted by the userCollection
<javax.faces.model.SelectItem> The filterOptions expressionThe filter value submitted by the userThe fixed column count.getSheet()
Get the parent sheetThe style class for the cell.getValue()
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
isValid()
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 valuesvoid
processUpdates
(javax.faces.context.FacesContext context) Sheet handles updating of modelvoid
processValidators
(javax.faces.context.FacesContext context) Don't do anything when called by inherited behavior.void
Reset the local value.void
setAutoCompleteAllowInvalid
(boolean value) void
setAutoCompleteStrict
(boolean value) void
setAutoCompleteTrimDropdown
(boolean value) void
void
setColType
(String value) Updates the column type.void
setColWidth
(Integer value) Updates the column widthvoid
setDateFormat
(String _dateFormat) void
setDatePickerConfig
(String _datePickerConfig) void
setFilterBy
(Object filterBy) Update the filter by fieldvoid
setFilterMatchMode
(String filterMatchMode) Update the filter match mode for this columnvoid
setFilterOptions
(Collection<javax.faces.model.SelectItem> filterOptions) Update the filterOptions fieldvoid
setFilterValue
(String filterValue) Update the filter value for this columnvoid
setHeaderText
(String value) Updates the fixed columns count.void
setNumericLocale
(String locale) void
setNumericPattern
(String _numericPattern) void
setOnvalidate
(String _onvalidate) void
setPasswordHashLength
(Integer _passwordHashLength) void
setPasswordHashSymbol
(String _passwordHashSymbol) void
setReadOnly
(boolean value) Updates the readOnly propertyvoid
setReadonlyCell
(boolean value) Updates the readOnly property of the cellvoid
setSelectItems
(Object selectItems) void
Updates the sheet reference to work around getParent sometimes returning null.void
setStyleClass
(String value) 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
-
COMPONENT_TYPE
- See Also:
-
COMPONENT_FAMILY
- See Also:
-
-
Constructor Details
-
SheetColumn
public SheetColumn()Default constructor
-
-
Method Details
-
getFamily
- Overrides:
getFamily
in classjavax.faces.component.UIInput
-
setHeaderText
Updates the fixed columns count.- Parameters:
value
-
-
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
Updates the column width- Parameters:
value
-
-
getColWidth
The column width- Returns:
-
setColType
Updates the column type. Possible values are: text, numeric, date, checkbox, autocomplete, handsontable.- Parameters:
value
-
-
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
-
getAutoCompleteVisibleRows
-
getSelectItems
-
setSelectItems
-
getPasswordHashLength
-
setPasswordHashLength
-
setPasswordHashSymbol
-
getPasswordHashSymbol
-
setNumericPattern
-
getNumericPattern
-
getNumericLocale
-
setNumericLocale
-
setDateFormat
-
getDateFormat
-
setDatePickerConfig
-
getDatePickerConfig
-
setTimeFormat
-
getTimeFormat
-
setOnvalidate
-
getOnvalidate
-
setVisible
public void setVisible(boolean value) -
isVisible
public boolean isVisible() -
setWordWrap
public void setWordWrap(boolean value) -
isWordWrap
-
setTrimWhitespace
public void setTrimWhitespace(boolean value) -
isTrimWhitespace
-
setStyleClass
Update the style class for the cell.- Parameters:
value
-
-
getStyleClass
The style class for the cell.- Returns:
-
getFilterBy
The filterBy expression- Returns:
-
setFilterBy
Update the filter by field- Parameters:
filterBy
-
-
getFilterValue
The filter value submitted by the user- Returns:
-
setFilterValue
Update the filter value for this column- Parameters:
filterValue
-
-
getFilterMatchMode
The filter match mode submitted by the user- Returns:
-
setFilterMatchMode
Update the filter match mode for this column- Parameters:
filterMatchMode
-
-
getFilterOptions
The filterOptions expression- Returns:
-
setFilterOptions
Update the filterOptions field -
getSheet
Get the parent sheet- Returns:
-
setSheet
Updates the sheet reference to work around getParent sometimes returning null.- Parameters:
sheet
- the owning sheet
-
setValue
Ignore attempts to set the local value for this column, again done by parent.- Specified by:
setValue
in interfacejavax.faces.component.ValueHolder
- Overrides:
setValue
in classjavax.faces.component.UIInput
-
getValue
When asked for the value, return the local value if available, otherwise the sheet value.- Specified by:
getValue
in interfacejavax.faces.component.ValueHolder
- Overrides:
getValue
in classjavax.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 interfacejavax.faces.component.EditableValueHolder
- Overrides:
isValid
in classjavax.faces.component.UIInput
-
setValid
public void setValid(boolean valid) when we become valid, invalidate the whole sheet.- Specified by:
setValid
in interfacejavax.faces.component.EditableValueHolder
- Overrides:
setValid
in classjavax.faces.component.UIInput
-
processDecodes
public void processDecodes(javax.faces.context.FacesContext context) Sheet handles decoding of all submitted values- Overrides:
processDecodes
in classjavax.faces.component.UIInput
-
processUpdates
public void processUpdates(javax.faces.context.FacesContext context) Sheet handles updating of model- Overrides:
processUpdates
in classjavax.faces.component.UIInput
-
resetValue
public void resetValue()Reset the local value. No submitted value tracked here. Validity not tracked here.- Specified by:
resetValue
in interfacejavax.faces.component.EditableValueHolder
- Overrides:
resetValue
in classjavax.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 classjavax.faces.component.UIInput
-
validate
public void validate(javax.faces.context.FacesContext context) Process all validators (skip normal UIInput behavior)- Overrides:
validate
in classjavax.faces.component.UIInput
-
validateRequired
Validates the value against the required flags on this column.- Parameters:
context
- the FacesContextnewValue
- the new value for this column- Returns:
- true if passes validation, otherwise valse
-