Class BaseTableRenderer

    • Constructor Detail

      • BaseTableRenderer

        public BaseTableRenderer()
    • Method Detail

      • renderHeader

        protected abstract void renderHeader​(FacesContext context,
                                             UIComponent table,
                                             ResponseWriter writer)
                                      throws IOException
        Called to render the opening/closing thead elements and any content nested between.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderFooter

        protected abstract void renderFooter​(FacesContext context,
                                             UIComponent table,
                                             ResponseWriter writer)
                                      throws IOException
        Called to render the opening/closing tfoot elements and any content nested between.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderRow

        protected abstract void renderRow​(FacesContext context,
                                          UIComponent table,
                                          UIComponent row,
                                          ResponseWriter writer)
                                   throws IOException
        Call to render the content that should be included between opening and closing tr elements.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        row - the current row (if any - an implmenetation may not need this)
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderTableStart

        protected void renderTableStart​(FacesContext context,
                                        UIComponent table,
                                        ResponseWriter writer,
                                        Attribute[] attributes)
                                 throws IOException
        Renders the start of a table and applies the value of styleClass if available and renders any pass through attributes that may be specified.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        attributes - pass-through attributes that the component supports
        Throws:
        IOException - if content cannot be written
      • renderTableEnd

        protected void renderTableEnd​(FacesContext context,
                                      UIComponent table,
                                      ResponseWriter writer)
                               throws IOException
        Renders the closing table element.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderCaption

        protected void renderCaption​(FacesContext context,
                                     UIComponent table,
                                     ResponseWriter writer)
                              throws IOException
        Renders the caption of the table applying the values of captionClass as the class and captionStyle as the style if either are present.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderTableBodyStart

        protected void renderTableBodyStart​(FacesContext context,
                                            UIComponent table,
                                            ResponseWriter writer)
                                     throws IOException
        Renders the starting tbody element.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderTableBodyEnd

        protected void renderTableBodyEnd​(FacesContext context,
                                          UIComponent table,
                                          ResponseWriter writer)
                                   throws IOException
        Renders the closing tbody element.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderRowStart

        protected void renderRowStart​(FacesContext context,
                                      UIComponent table,
                                      ResponseWriter writer)
                               throws IOException
        Renders the starting tr element applying any values from the rowClasses attribute.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • renderRowEnd

        protected void renderRowEnd​(FacesContext context,
                                    UIComponent table,
                                    ResponseWriter writer)
                             throws IOException
        Renders the closing rt element.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        writer - the current writer
        Throws:
        IOException - if content cannot be written
      • getMetaInfo

        protected BaseTableRenderer.TableMetaInfo getMetaInfo​(FacesContext context,
                                                              UIComponent table)
        Returns a TableMetaInfo object containing details such as row and column classes, columns, and a mechanism for scrolling through the row/column classes.
        Parameters:
        context - the FacesContext for the current request
        table - the table that's being rendered
        Returns:
        the TableMetaInfo for provided table
      • clearMetaInfo

        protected void clearMetaInfo​(FacesContext context,
                                     UIComponent table)
        Removes the cached TableMetaInfo from the specified component.
        Parameters:
        context - the FacesContext for the current request
        table - the table from which the TableMetaInfo will be removed
      • createKey

        protected String createKey​(UIComponent table)
        Creates a unique key based on the provided UIComponent with which the TableMetaInfo can be looked up.
        Parameters:
        table - the table that's being rendered
        Returns:
        a unique key to store the metadata in the request and still have it associated with a specific component.