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.CoreRendererThe Sheet renderer.- Since:
- 6.2
- Author:
- Mark Lassiter / Melloware
-
-
Constructor Summary
Constructors Constructor Description SheetRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(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 voiddecodeFilters(Sheet sheet, java.util.Map<java.lang.String,java.lang.String> params, java.lang.String clientId)Decodes 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, java.lang.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, java.lang.String attrName, java.lang.String value)Encodes an optional attribute to the widget builder specified.protected voidencodeOptionalNativeAttr(org.primefaces.util.WidgetBuilder wb, java.lang.String attrName, java.lang.Object value)Encodes an optional native attribute (unquoted).protected JavascriptVarBuilderencodeRow(javax.faces.context.FacesContext context, java.lang.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.booleangetRendersChildren()We 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, renderValidationMetadata, shouldRenderAttribute, shouldWriteId
-
-
-
-
Method Detail
-
encodeEnd
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOExceptionEncodes the Sheet component- Overrides:
encodeEndin classjavax.faces.render.Renderer- Throws:
java.io.IOException
-
encodeMarkup
protected void encodeMarkup(javax.faces.context.FacesContext context, Sheet sheet, javax.faces.context.ResponseWriter responseWriter) throws java.io.IOExceptionEncodes the HTML markup for the sheet.- Throws:
java.io.IOException
-
encodeOptionalAttr
protected void encodeOptionalAttr(org.primefaces.util.WidgetBuilder wb, java.lang.String attrName, java.lang.String value) throws java.io.IOExceptionEncodes an optional attribute to the widget builder specified.- Parameters:
wb- the WidgetBuilder to append toattrName- the attribute namevalue- the value- Throws:
java.io.IOException- if any IO error occurs
-
encodeOptionalNativeAttr
protected void encodeOptionalNativeAttr(org.primefaces.util.WidgetBuilder wb, java.lang.String attrName, java.lang.Object value) throws java.io.IOExceptionEncodes an optional native attribute (unquoted).- Parameters:
wb- the WidgetBuilder to append toattrName- the attribute namevalue- the value- Throws:
java.io.IOException- if any IO error occurs
-
encodeScript
protected void encodeScript(javax.faces.context.FacesContext context, Sheet sheet) throws java.io.IOExceptionEncodes the Javascript for the sheet.- Parameters:
context- the FacesContextsheet- the Sheet- Throws:
java.io.IOException- if any IO error occurs
-
encodeInvalidData
protected void encodeInvalidData(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws java.io.IOException
Encodes the necessary JS to render invalid data.- Throws:
java.io.IOException- if any IO error occurs
-
encodeColHeaders
protected void encodeColHeaders(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws java.io.IOException
Encode the column headers- Throws:
java.io.IOException- if any IO error occurs
-
encodeColOptions
protected void encodeColOptions(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws java.io.IOException
Encode the column options- Throws:
java.io.IOException- if any IO error occurs
-
encodeData
protected void encodeData(javax.faces.context.FacesContext context, Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws java.io.IOExceptionEncode the row data. Builds row data, style data and read only object.- Throws:
java.io.IOException
-
encodeRow
protected JavascriptVarBuilder encodeRow(javax.faces.context.FacesContext context, java.lang.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 java.io.IOExceptionHidden accessible keyboard trap for getting focus.- Parameters:
context- the Faces contextsheet- the Sheet widget- Throws:
java.io.IOException- if any IO error occurs- See Also:
- GitHub 741
-
encodeFilterValues
protected void encodeFilterValues(javax.faces.context.ResponseWriter responseWriter, Sheet sheet, java.lang.String clientId) throws java.io.IOExceptionEncodes the filter values.- Throws:
java.io.IOException
-
encodeFilterVar
protected void encodeFilterVar(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws java.io.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:
java.io.IOException
-
encodeSortVar
protected void encodeSortVar(Sheet sheet, org.primefaces.util.WidgetBuilder wb) throws java.io.IOException
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:
java.io.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
protected void decodeFilters(Sheet sheet, java.util.Map<java.lang.String,java.lang.String> params, java.lang.String clientId)
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
-
-