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:
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.ClientBehaviorHolderJSF 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.StringCOMPONENT_FAMILYstatic java.lang.StringCOMPONENT_TYPE
-
Constructor Summary
Constructors Constructor Description SheetColumn()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetAutoCompleteVisibleRows()java.lang.StringgetColType()the Handsontable column type.java.lang.IntegergetColWidth()The column widthjava.lang.StringgetDateFormat()java.lang.StringgetDatePickerConfig()java.lang.StringgetFamily()java.lang.ObjectgetFilterBy()The filterBy expressionjava.lang.StringgetFilterMatchMode()The filter match mode submitted by the userjava.util.Collection<javax.faces.model.SelectItem>getFilterOptions()The filterOptions expressionjava.lang.StringgetFilterValue()The filter value submitted by the userjava.lang.StringgetHeaderText()The fixed column count.java.lang.StringgetNumericLocale()java.lang.StringgetNumericPattern()java.lang.StringgetOnvalidate()java.lang.IntegergetPasswordHashLength()java.lang.StringgetPasswordHashSymbol()java.lang.ObjectgetSelectItems()SheetgetSheet()Get the parent sheetjava.lang.StringgetStyleClass()The style class for the cell.java.lang.StringgetTimeFormat()java.lang.ObjectgetValue()When asked for the value, return the local value if available, otherwise the sheet value.booleanisAutoCompleteAllowInvalid()booleanisAutoCompleteFilter()booleanisAutoCompleteStrict()booleanisAutoCompleteTrimDropdown()booleanisReadOnly()Flag indicating whether this column is read only.booleanisReadonlyCell()Flag indicating whether this cell is read only.java.lang.BooleanisTrimWhitespace()booleanisValid()We are valid if the sheet is valid, we do not track at the individual column.booleanisVisible()java.lang.BooleanisWordWrap()voidprocessDecodes(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.voidresetValue()Reset the local value.voidsetAutoCompleteAllowInvalid(boolean value)voidsetAutoCompleteFilter(boolean value)voidsetAutoCompleteStrict(boolean value)voidsetAutoCompleteTrimDropdown(boolean value)voidsetAutoCompleteVisibleRows(java.lang.Integer value)voidsetColType(java.lang.String value)Updates the column type.voidsetColWidth(java.lang.Integer value)Updates the column widthvoidsetDateFormat(java.lang.String _dateFormat)voidsetDatePickerConfig(java.lang.String _datePickerConfig)voidsetFilterBy(java.lang.Object filterBy)Update the filter by fieldvoidsetFilterMatchMode(java.lang.String filterMatchMode)Update the filter match mode for this columnvoidsetFilterOptions(java.util.Collection<javax.faces.model.SelectItem> filterOptions)Update the filterOptions fieldvoidsetFilterValue(java.lang.String filterValue)Update the filter value for this columnvoidsetHeaderText(java.lang.String value)Updates the fixed columns count.voidsetNumericLocale(java.lang.String locale)voidsetNumericPattern(java.lang.String _numericPattern)voidsetOnvalidate(java.lang.String _onvalidate)voidsetPasswordHashLength(java.lang.Integer _passwordHashLength)voidsetPasswordHashSymbol(java.lang.String _passwordHashSymbol)voidsetReadOnly(boolean value)Updates the readOnly propertyvoidsetReadonlyCell(boolean value)Updates the readOnly property of the cellvoidsetSelectItems(java.lang.Object selectItems)voidsetSheet(Sheet sheet)Updates the sheet reference to work around getParent sometimes returning null.voidsetStyleClass(java.lang.String value)Update the style class for the cell.voidsetTimeFormat(java.lang.String _timeFormat)voidsetTrimWhitespace(boolean value)voidsetValid(boolean valid)when we become valid, invalidate the whole sheet.voidsetValue(java.lang.Object value)Ignore 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, 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
-
-
-
-
Field Detail
-
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
- See Also:
- Constant Field Values
-
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFamily
public java.lang.String getFamily()
- Overrides:
getFamilyin classjavax.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:
setValuein interfacejavax.faces.component.ValueHolder- Overrides:
setValuein classjavax.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:
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
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 FacesContextnewValue- the new value for this column- Returns:
- true if passes validation, otherwise valse
-
-