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_NAMEFields 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.booleanbooleanbooleanbooleanFlag indicating whether this column is read only.booleanFlag indicating whether this cell is read only. the var reference will be available.booleanisValid()We are valid if the sheet is valid, we do not track at the individual column.booleanvoidprocessDecodes(javax.faces.context.FacesContext context) Sheet handles decoding of all submitted valuesvoidprocessUpdates(javax.faces.context.FacesContext context) Sheet handles updating of modelvoidprocessValidators(javax.faces.context.FacesContext context) Don't do anything when called by inherited behavior.voidReset the local value.voidsetAutoCompleteAllowInvalid(boolean value) voidsetAutoCompleteStrict(boolean value) voidsetAutoCompleteTrimDropdown(boolean value) voidvoidsetColType(String value) Updates the column type.voidsetColWidth(Integer value) Updates the column widthvoidsetDateFormat(String _dateFormat) voidsetDatePickerConfig(String _datePickerConfig) voidsetFilterBy(Object filterBy) Update the filter by fieldvoidsetFilterMatchMode(String filterMatchMode) Update the filter match mode for this columnvoidsetFilterOptions(Collection<javax.faces.model.SelectItem> filterOptions) Update the filterOptions fieldvoidsetFilterValue(String filterValue) Update the filter value for this columnvoidsetHeaderText(String value) Updates the fixed columns count.voidsetNumericLocale(String locale) voidsetNumericPattern(String _numericPattern) voidsetOnvalidate(String _onvalidate) voidsetPasswordHashLength(Integer _passwordHashLength) voidsetPasswordHashSymbol(String _passwordHashSymbol) voidsetReadOnly(boolean value) Updates the readOnly propertyvoidsetReadonlyCell(boolean value) Updates the readOnly property of the cellvoidsetSelectItems(Object selectItems) voidUpdates the sheet reference to work around getParent sometimes returning null.voidsetStyleClass(String value) Update the style class for the cell.voidsetTimeFormat(String _timeFormat) voidsetTrimWhitespace(boolean value) voidsetValid(boolean valid) when we become valid, invalidate the whole sheet.voidIgnore attempts to set the local value for this column, again done by parent.voidsetVisible(boolean value) voidsetWordWrap(boolean value) voidvalidate(javax.faces.context.FacesContext context) Process all validators (skip normal UIInput behavior)protected booleanvalidateRequired(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, validateValueMethods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverterMethods 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, unsubscribeFromEventMethods 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, visitTreeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors, getDefaultEventName, getEventNamesMethods 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:
getFamilyin 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:
setValuein interfacejavax.faces.component.ValueHolder- Overrides:
setValuein classjavax.faces.component.UIInput
-
getValue
When asked for the value, return the local value if available, otherwise the sheet value.- Specified by:
getValuein interfacejavax.faces.component.ValueHolder- Overrides:
getValuein 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:
isValidin interfacejavax.faces.component.EditableValueHolder- Overrides:
isValidin classjavax.faces.component.UIInput
-
setValid
public void setValid(boolean valid) when we become valid, invalidate the whole sheet.- Specified by:
setValidin interfacejavax.faces.component.EditableValueHolder- Overrides:
setValidin classjavax.faces.component.UIInput
-
processDecodes
public void processDecodes(javax.faces.context.FacesContext context) Sheet handles decoding of all submitted values- Overrides:
processDecodesin classjavax.faces.component.UIInput
-
processUpdates
public void processUpdates(javax.faces.context.FacesContext context) Sheet handles updating of model- Overrides:
processUpdatesin classjavax.faces.component.UIInput
-
resetValue
public void resetValue()Reset the local value. No submitted value tracked here. Validity not tracked here.- Specified by:
resetValuein interfacejavax.faces.component.EditableValueHolder- Overrides:
resetValuein 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:
processValidatorsin classjavax.faces.component.UIInput
-
validate
public void validate(javax.faces.context.FacesContext context) Process all validators (skip normal UIInput behavior)- Overrides:
validatein 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
-