org.richfaces.javascript

## Class JavaScriptServiceImpl

- java.lang.Object
- - org.richfaces.javascript.JavaScriptServiceImpl

- All Implemented Interfaces:
    JavaScriptService

      public class JavaScriptServiceImpl
      extends Object
      implements JavaScriptService

  Author:
    asmirnov@exadel.com

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JavaScriptServiceImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<S> S` | `addPageReadyScript(javax.faces.context.FacesContext facesContext, S script)` This method adds script that has to be executed in page.onready event listener, as required by jQuery components.
    `<S> S` | `addScript(javax.faces.context.FacesContext facesContext, S script)` Adds new script to render at the end of page.
    `ScriptsHolder` | `getScriptsHolder(javax.faces.context.FacesContext context)` Get object with collection of scripts designeted for deffered rendering.

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

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

- - ### Constructor Detail

    - #### JavaScriptServiceImpl

          public JavaScriptServiceImpl()

  - ### Method Detail

    - #### addScript

          public <S> S addScript(javax.faces.context.FacesContext facesContext,
                        S script)

      Description copied from interface: `JavaScriptService`

      Adds new script to render at the end of page. Is the same script already set to render ( lookup by equals() method ), no new object added.

      Specified by:
        `addScript` in interface `JavaScriptService`
      Parameters:
        `facesContext` - TODO
      Returns:
        actual object that will be rendered at the end of page.

    - #### addPageReadyScript

          public <S> S addPageReadyScript(javax.faces.context.FacesContext facesContext,
                                 S script)

      Description copied from interface: `JavaScriptService`

      This method adds script that has to be executed in page.onready event listener, as required by jQuery components.

      Specified by:
        `addPageReadyScript` in interface `JavaScriptService`
      Parameters:
        `facesContext` - TODO
      Returns:

    - #### getScriptsHolder

          public ScriptsHolder getScriptsHolder(javax.faces.context.FacesContext context)

      Description copied from interface: `JavaScriptService`

      Get object with collection of scripts designeted for deffered rendering.

      Specified by:
        `getScriptsHolder` in interface `JavaScriptService`
      Returns:
        ViewResource component that holds contect of all scripts, or special case object with empty collections.

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