org.richfaces.renderkit.util

## Class AjaxRendererUtils

- java.lang.Object
- - org.richfaces.renderkit.util.AjaxRendererUtils

-     public final class AjaxRendererUtils
      extends Object

  Author:
    shura

    Some utilites for render AJAX components.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `AJAX_ABORT_ATTR`
    `static String` | `AJAX_AREAS_RENDERED`
    `static String` | `AJAX_DELAY_ATTR`
    `static String` | `AJAX_QUEUE_ATTR`
    `static String` | `AJAX_SINGLE_ATTR`
    `static String` | `AJAX_SINGLE_PARAMETER_NAME`
    `static String` | `BEGIN_EVENT_NAME`
    `static String` | `ONBEGIN_ATTR_NAME`
    `static String` | `ONCOMPLETE_CONTENT_ID` Attribute for keep JavaScript function name for call after complete request.
    `static String` | `QUEUE_ID_ATTRIBUTE`
    `static String` | `SIMILARITY_GROUPING_ID_ATTR`
    `static String` | `STATUS_ATTR_NAME` Attribute for keep clientId of status component
    `static String` | `VALUE_ATTR`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AjaxFunction` | `buildAjaxFunction(javax.faces.component.behavior.ClientBehaviorContext behaviorContext, AjaxClientBehavior behavior)`
    `static AjaxFunction` | `buildAjaxFunction(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)` Create call to Ajax Submit function with first two parameters
    `static JSFunctionDefinition` | `buildAjaxOnBeforeDomUpdate(String body)`
    `static JSFunctionDefinition` | `buildAjaxOncomplete(String body)`
    `static AjaxOptions` | `buildEventOptions(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)`
    `static StringBuffer` | `buildOnClick(javax.faces.component.UIComponent uiComponent, javax.faces.context.FacesContext facesContext)` Build JavaScript onclick event for given component
    `static StringBuffer` | `buildOnClick(javax.faces.component.UIComponent uiComponent, javax.faces.context.FacesContext facesContext, boolean omitDefaultActionUrl)` Build JavaScript onclick event for given component
    `static StringBuffer` | `buildOnEvent(javax.faces.component.UIComponent uiComponent, javax.faces.context.FacesContext facesContext, String eventName)` Build JavaScript event for component
    `static StringBuffer` | `buildOnEvent(javax.faces.component.UIComponent uiComponent, javax.faces.context.FacesContext facesContext, String eventName, boolean omitDefaultActionUrl)` Build JavaScript event for component
    `static String` | `getAjaxStatus(javax.faces.component.UIComponent component)` Get status area Id for given component.
    `static String` | `getQueueId(javax.faces.component.UIComponent component)`

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

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

- - ### Field Detail

    - #### BEGIN_EVENT_NAME

          public static final String BEGIN_EVENT_NAME

      See Also:
        Constant Field Values

    - #### AJAX_ABORT_ATTR

          public static final String AJAX_ABORT_ATTR

      See Also:
        Constant Field Values

    - #### AJAX_AREAS_RENDERED

          public static final String AJAX_AREAS_RENDERED

      See Also:
        Constant Field Values

    - #### AJAX_DELAY_ATTR

          public static final String AJAX_DELAY_ATTR

      See Also:
        Constant Field Values

    - #### AJAX_QUEUE_ATTR

          public static final String AJAX_QUEUE_ATTR

      See Also:
        Constant Field Values

    - #### AJAX_SINGLE_ATTR

          public static final String AJAX_SINGLE_ATTR

      See Also:
        Constant Field Values

    - #### AJAX_SINGLE_PARAMETER_NAME

          public static final String AJAX_SINGLE_PARAMETER_NAME

      See Also:
        Constant Field Values

    - #### ONBEGIN_ATTR_NAME

          public static final String ONBEGIN_ATTR_NAME

      See Also:
        Constant Field Values

    - #### ONCOMPLETE_CONTENT_ID

          public static final String ONCOMPLETE_CONTENT_ID

      Attribute for keep JavaScript function name for call after complete request.
      See Also:
        Constant Field Values

    - #### SIMILARITY_GROUPING_ID_ATTR

          public static final String SIMILARITY_GROUPING_ID_ATTR

      See Also:
        Constant Field Values

    - #### STATUS_ATTR_NAME

          public static final String STATUS_ATTR_NAME

      Attribute for keep clientId of status component
      See Also:
        Constant Field Values

    - #### VALUE_ATTR

          public static final String VALUE_ATTR

      See Also:
        Constant Field Values

    - #### QUEUE_ID_ATTRIBUTE

          public static final String QUEUE_ID_ATTRIBUTE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### buildOnClick

          public static StringBuffer buildOnClick(javax.faces.component.UIComponent uiComponent,
                                  javax.faces.context.FacesContext facesContext)

      Build JavaScript onclick event for given component
      Parameters:
        `uiComponent` - - component for build event
        `facesContext` -
      Returns:
        `StringBuffer` with Javascript code

    - #### buildOnClick

          public static StringBuffer buildOnClick(javax.faces.component.UIComponent uiComponent,
                                  javax.faces.context.FacesContext facesContext,
                                  boolean omitDefaultActionUrl)

      Build JavaScript onclick event for given component
      Parameters:
        `uiComponent` - - component for build event
        `facesContext` -
        `omitDefaultActionUrl` - - default action URL is not encoded if parameter is true
      Returns:
        `StringBuffer` with Javascript code

    - #### buildOnEvent

          public static StringBuffer buildOnEvent(javax.faces.component.UIComponent uiComponent,
                                  javax.faces.context.FacesContext facesContext,
                                  String eventName)

      Build JavaScript event for component
      Parameters:
        `uiComponent` - - component for build event
        `facesContext` -
        `eventName` - - name of event
      Returns:
        `StringBuffer` with Javascript code

    - #### buildOnEvent

          public static StringBuffer buildOnEvent(javax.faces.component.UIComponent uiComponent,
                                  javax.faces.context.FacesContext facesContext,
                                  String eventName,
                                  boolean omitDefaultActionUrl)

      Build JavaScript event for component
      Parameters:
        `uiComponent` - - component for build event
        `facesContext` -
        `eventName` - - name of event
        `omitDefaultActionUrl` - - default action URL is not encoded if parameter is true
      Returns:
        `StringBuffer` with Javascript code

    - #### buildEventOptions

          public static AjaxOptions buildEventOptions(javax.faces.context.FacesContext facesContext,
                                      javax.faces.component.UIComponent component)

    - #### buildAjaxFunction

          public static AjaxFunction buildAjaxFunction(javax.faces.context.FacesContext facesContext,
                                       javax.faces.component.UIComponent component)

      Create call to Ajax Submit function with first two parameters
      Parameters:
        `facesContext` -
        `component` -
      Returns:

    - #### buildAjaxFunction

          public static AjaxFunction buildAjaxFunction(javax.faces.component.behavior.ClientBehaviorContext behaviorContext,
                                       AjaxClientBehavior behavior)

    - #### getAjaxStatus

          public static String getAjaxStatus(javax.faces.component.UIComponent component)

      Get status area Id for given component.
      Parameters:
        `component` -
      Returns:
        clientId of status area, or `null`

    - #### getQueueId

          public static String getQueueId(javax.faces.component.UIComponent component)

    - #### buildAjaxOncomplete

          public static JSFunctionDefinition buildAjaxOncomplete(String body)

    - #### buildAjaxOnBeforeDomUpdate

          public static JSFunctionDefinition buildAjaxOnBeforeDomUpdate(String body)

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.