Class SheetRenderer
java.lang.Object
javax.faces.render.Renderer
org.primefaces.renderkit.CoreRenderer
org.primefaces.extensions.component.sheet.SheetRenderer
public class SheetRenderer
extends org.primefaces.renderkit.CoreRenderer
The Sheet renderer.
- Since:
- 6.2
- Author:
- Mark Lassiter / Melloware
-
Field Summary
Fields inherited from class javax.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Overrides decode and to parse the request parameters for the two hidden input fields: clientid_input: any new changes provided by the user clientid_selection: the user's cell selections These are JSON values and are parsed into our submitted values data on the Sheet component.protected voiddecodeBehaviors(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Decodes client behaviors (ajax events).protected voidDecodes the filter valuesprotected voidencodeColHeaders(Sheet sheet, org.primefaces.util.WidgetBuilder wb) Encode the column headersprotected voidencodeColOptions(Sheet sheet, org.primefaces.util.WidgetBuilder wb) Encode the column optionsprotected voidencodeData(javax.faces.context.FacesContext context, Sheet sheet, org.primefaces.util.WidgetBuilder wb) Encode the row data.voidencodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Encodes the Sheet componentprotected voidencodeFilterValues(javax.faces.context.ResponseWriter responseWriter, Sheet sheet, String clientId) Encodes the filter values.protected voidencodeFilterVar(Sheet sheet, org.primefaces.util.WidgetBuilder wb) Encodes a javascript filter var that informs the col header event of the column's filtering options.protected voidencodeInvalidData(Sheet sheet, org.primefaces.util.WidgetBuilder wb) Encodes the necessary JS to render invalid data.protected voidencodeKeyboardTrap(javax.faces.context.FacesContext context, Sheet sheet) Hidden accessible keyboard trap for getting focus.protected voidencodeMarkup(javax.faces.context.FacesContext context, Sheet sheet, javax.faces.context.ResponseWriter responseWriter) Encodes the HTML markup for the sheet.protected voidencodeOptionalAttr(org.primefaces.util.WidgetBuilder wb, String attrName, String value) Encodes an optional attribute to the widget builder specified.protected voidencodeOptionalNativeAttr(org.primefaces.util.WidgetBuilder wb, String attrName, Object value) Encodes an optional native attribute (unquoted).protected JavascriptVarBuilderencodeRow(javax.faces.context.FacesContext context, String rowKey, JavascriptVarBuilder jsData, JavascriptVarBuilder jsRowStyle, JavascriptVarBuilder jsStyle, JavascriptVarBuilder jsReadOnly, Sheet sheet, int rowIndex) Encode a single row.protected voidencodeScript(javax.faces.context.FacesContext context, Sheet sheet) Encodes the Javascript for the sheet.protected voidencodeSortVar(Sheet sheet, org.primefaces.util.WidgetBuilder wb) Encodes a javascript sort var that informs the col header event of the column's sorting options.booleanWe render the columns (the children).Methods inherited from class org.primefaces.renderkit.CoreRenderer
buildAjaxRequest, buildAjaxRequest, buildAjaxRequest, buildDomEvent, buildNonAjaxRequest, buildNonAjaxRequest, encodeClientBehaviors, encodeIndexedId, endsWithLenghtUnit, getEventBehaviors, getHighlighter, getIconOnlyButtonText, getResourceRequestPath, getResourceURL, getStyleBuilder, getStyleClassBuilder, getWidgetBuilder, isGrouped, isValueBlank, logDevelopmentWarning, preConfiguredAjaxRequestBuilder, preConfiguredAjaxRequestBuilder, renderAttribute, renderButtonValue, renderChild, renderChildren, renderDomEvent, renderDomEvents, renderDummyMarkup, renderDynamicPassThruAttributes, renderHiddenInput, renderOnchange, renderOnclick, renderPassThruAttributes, renderPassThruAttributes, renderPassThruAttributes, renderRTLDirection, renderValidationMetadata, shouldRenderAttribute, shouldWriteIdMethods inherited from class javax.faces.render.Renderer
convertClientId, encodeBegin, encodeChildren, getConvertedValue
-
Constructor Details
-
SheetRenderer
public SheetRenderer()
-
-
Method Details
-
encodeEnd
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException Encodes the Sheet component- Overrides:
encodeEndin classjavax.faces.render.Renderer- Throws:
IOException
-
encodeMarkup
protected void encodeMarkup(javax.faces.context.FacesContext context, Sheet sheet, javax.faces.context.ResponseWriter responseWriter) throws IOException Encodes the HTML markup for the sheet.- Throws:
IOException
-
encodeOptionalAttr
protected void encodeOptionalAttr(org.primefaces.util.WidgetBuilder wb, String attrName, String value) throws IOException Encodes an optional attribute to the widget builder specified.- Parameters:
wb- the WidgetBuilder to append toattrName- the attribute namevalue- the value- Throws:
IOException- if any IO error occurs
-
encodeOptionalNativeAttr
protected void encodeOptionalNativeAttr(org.primefaces.util.WidgetBuilder wb, String attrName, Object value) throws IOException Encodes an optional native attribute (unquoted).- Parameters:
wb- the WidgetBuilder to append toattrName- the attribute namevalue- the value- Throws:
IOException- if any IO error occurs
-
encodeScript
protected void encodeScript(javax.faces.context.FacesContext context, Sheet sheet) throws IOException Encodes the Javascript for the sheet.- Parameters:
context- the FacesContextsheet- the Sheet- Throws:
IOException- if any IO error occurs
-
encodeInvalidData
protected void encodeInvalidData(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws IOException Encodes the necessary JS to render invalid data.- Throws:
IOException- if any IO error occurs
-
encodeColHeaders
protected void encodeColHeaders(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws IOException Encode the column headers- Throws:
IOException- if any IO error occurs
-
encodeColOptions
protected void encodeColOptions(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws IOException Encode the column options- Throws:
IOException- if any IO error occurs
-
encodeData
protected void encodeData(javax.faces.context.FacesContext context, Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws IOException Encode the row data. Builds row data, style data and read only object.- Throws:
IOException
-
encodeRow
protected JavascriptVarBuilder encodeRow(javax.faces.context.FacesContext context, String rowKey, JavascriptVarBuilder jsData, JavascriptVarBuilder jsRowStyle, JavascriptVarBuilder jsStyle, JavascriptVarBuilder jsReadOnly, Sheet sheet, int rowIndex) Encode a single row.- Returns:
- the JSON row
-
encodeKeyboardTrap
protected void encodeKeyboardTrap(javax.faces.context.FacesContext context, Sheet sheet) throws IOException Hidden accessible keyboard trap for getting focus.- Parameters:
context- the Faces contextsheet- the Sheet widget- Throws:
IOException- if any IO error occurs- See Also:
-
encodeFilterValues
protected void encodeFilterValues(javax.faces.context.ResponseWriter responseWriter, Sheet sheet, String clientId) throws IOException Encodes the filter values.- Throws:
IOException
-
encodeFilterVar
protected void encodeFilterVar(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws IOException Encodes a javascript filter var that informs the col header event of the column's filtering options. The var is an array in the form: ["false","true",["option 1", "option 2"]] False indicates no filtering for the column. True indicates simple input text filter. Array of values indicates a drop down filter with the listed options.- Throws:
IOException
-
encodeSortVar
Encodes a javascript sort var that informs the col header event of the column's sorting options. The var is an array of boolean indicating whether or not the column is sortable.- Throws:
IOException
-
decode
public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Overrides decode and to parse the request parameters for the two hidden input fields:- clientid_input: any new changes provided by the user
- clientid_selection: the user's cell selections
- Overrides:
decodein classjavax.faces.render.Renderer
-
decodeFilters
Decodes the filter values -
decodeBehaviors
protected void decodeBehaviors(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Decodes client behaviors (ajax events).- Overrides:
decodeBehaviorsin classorg.primefaces.renderkit.CoreRenderer- Parameters:
context- the FacesContextcomponent- the Component being decodes
-
getRendersChildren
public boolean getRendersChildren()We render the columns (the children).- Overrides:
getRendersChildrenin classjavax.faces.render.Renderer
-