org.richfaces.renderkit.html

## Class RichTableMenuRenderer

- java.lang.Object
- - org.richfaces.renderkit.html.TableMenuRenderer
  - - org.richfaces.renderkit.html.RichTableMenuRenderer

- All Implemented Interfaces:
    java.io.Serializable

      public class RichTableMenuRenderer
      extends TableMenuRenderer

  Renderer class for table menu.
  Author:
    pawelgo
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.richfaces.renderkit.html.TableMenuRenderer

      `CHANGE_COL_VISIBILITY, changeColumnVisibilityFunction, column, context, groupFunction, onAjaxCompleteFunction, prepareFunction, resourceBuilder, sortFunction, table`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RichTableMenuRenderer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `buildGroupMenuItem(javax.faces.component.UIComponent parent)` Builds menu item for sorting.
    `protected void` | `buildMenu()` Builds menu for current column.
    `protected java.lang.String` | `buildMenuId()` Builds menu id base on column for which menu is built.
    `protected void` | `buildMenuItem(javax.faces.component.UIComponent parent, UIColumn col)` Builds menu items for changing column visibility.
    `protected void` | `buildSortMenuItem(javax.faces.component.UIComponent parent, boolean asc)` Builds menu item for sorting.
    `protected void` | `createMenu()` Creates menu and ands it to table as child.
    `org.ajax4jsf.javascript.JSFunctionDefinition` | `createShowMenuEventFunction()` Creates JavaScript code to be executed in order to show menu on some event.
    `protected void` | `ensureMenuBuilt()`
    `java.lang.String` | `render()` Renders table menu.

    - ### Methods inherited from class org.richfaces.renderkit.html.TableMenuRenderer

      `renderMenu, setChangeColumnVisibilityFunction, setGroupFunction, setOnAjaxCompleteFunction, setPrepareFunction, setSortFunction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RichTableMenuRenderer

          public RichTableMenuRenderer()

  - ### Method Detail

    - #### render

          public java.lang.String render()
                                  throws java.io.IOException

      Description copied from class: `TableMenuRenderer`
      Renders table menu.
      Specified by:
        `render` in class `TableMenuRenderer`
      Returns:
        created menu (DOM element) id
      Throws:
        `java.io.IOException`

    - #### ensureMenuBuilt

          protected void ensureMenuBuilt()
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### buildMenuId

          protected java.lang.String buildMenuId()

      Builds menu id base on column for which menu is built.
      Returns:
        menu id

    - #### createMenu

          protected void createMenu()
                             throws java.io.IOException

      Creates menu and ands it to table as child.
      Throws:
        `java.io.IOException`

    - #### buildMenu

          protected void buildMenu()
                            throws java.io.IOException

      Builds menu for current column. Creates menu if not exist yet and adds items.
      Throws:
        `java.io.IOException`

    - #### buildSortMenuItem

          protected void buildSortMenuItem(javax.faces.component.UIComponent parent,
                               boolean asc)
                                    throws java.io.IOException

      Builds menu item for sorting.
      Parameters:
        `parent` - parent component for created item
        `asc` - sort direction
      Throws:
        `java.io.IOException`

    - #### buildGroupMenuItem

          protected void buildGroupMenuItem(javax.faces.component.UIComponent parent)
                                     throws java.io.IOException

      Builds menu item for sorting.
      Parameters:
        `parent` - parent component for created item
      Throws:
        `java.io.IOException`

    - #### buildMenuItem

          protected void buildMenuItem(javax.faces.component.UIComponent parent,
                           UIColumn col)
                                throws java.io.IOException

      Builds menu items for changing column visibility.
      Parameters:
        `parent` - parent component for created item
        `col` - column component correspond to created item
      Throws:
        `java.io.IOException`

    - #### createShowMenuEventFunction

          public org.ajax4jsf.javascript.JSFunctionDefinition createShowMenuEventFunction()

      Description copied from class: `TableMenuRenderer`
      Creates JavaScript code to be executed in order to show menu on some event.
      Specified by:
        `createShowMenuEventFunction` in class `TableMenuRenderer`
      Returns:
        JavaScript code causes showing menu

Copyright © 2014. All Rights Reserved.