Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ajax4jsf.javascript
Class ScriptUtils

    java.lang.Object
      org.ajax4jsf.javascript.ScriptUtils

    public final class ScriptUtils

extends java.lang.Object

Version:
  $Revision: 1.1.2.3 $ $Date: 2007/01/24 13:22:31 $
Author:
  shura (latest modification by $Author: alexsmirnov $)

Method Summary
`static void` | `addEncoded(java.lang.StringBuilder buff, java.lang.Object obj)`
`static void` | `addEncodedString(java.lang.StringBuilder buff, java.lang.Object obj)`
`static java.lang.String` | `escapeCSSMetachars(java.lang.String s)` Escapes CSS meta-characters in string according to jQuery selectors document.
`static java.lang.String` | `getValidJavascriptName(java.lang.String s)`
`static boolean` | `isValidProperty(java.lang.Object property)` Test for valid value of property.
`static boolean` | `shouldRenderAttribute(java.lang.Object attributeVal)`
`static boolean` | `shouldRenderAttribute(java.lang.String attributeName, java.lang.Object attributeVal)`
`static java.lang.String` | `toScript(java.lang.Object obj)` Convert any Java Object to JavaScript representation ( as possible ).
`static void` | `writeEncoded(java.io.Writer w, java.lang.Object obj)`
`static void` | `writeEncodedString(java.io.Writer w, java.lang.Object obj)`
`static void` | `writeToStream(javax.faces.context.ResponseWriter responseWriter, java.lang.Object obj)` Convert any Java Object to JavaScript representation ( as possible ) and write it to writer immediately

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### writeToStream

    public static void writeToStream(javax.faces.context.ResponseWriter responseWriter,
                                     java.lang.Object obj)
                              throws java.io.IOException

  Convert any Java Object to JavaScript representation ( as possible ) and write it to writer immediately

  Parameters:
    `responseWriter` -
    `obj` -
  Throws:
    `java.io.IOException`

### toScript

    public static java.lang.String toScript(java.lang.Object obj)

  Convert any Java Object to JavaScript representation ( as possible ).

  Parameters:
    `obj` -
  Returns:

### writeEncodedString

    public static void writeEncodedString(java.io.Writer w,
                                          java.lang.Object obj)
                                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### addEncodedString

    public static void addEncodedString(java.lang.StringBuilder buff,
                                        java.lang.Object obj)

### writeEncoded

    public static void writeEncoded(java.io.Writer w,
                                    java.lang.Object obj)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

### addEncoded

    public static void addEncoded(java.lang.StringBuilder buff,
                                  java.lang.Object obj)

### getValidJavascriptName

    public static java.lang.String getValidJavascriptName(java.lang.String s)

### shouldRenderAttribute

    public static boolean shouldRenderAttribute(java.lang.Object attributeVal)

### shouldRenderAttribute

    public static boolean shouldRenderAttribute(java.lang.String attributeName,
                                                java.lang.Object attributeVal)

### isValidProperty

    public static boolean isValidProperty(java.lang.Object property)

  Test for valid value of property. by default, for non-setted properties with Java primitive types of JSF component return appropriate MIN_VALUE .

  Parameters:
    `property` - - value of property returned from `UIComponent.getAttributes()`
  Returns:
    true for setted property, false otherthise.

### escapeCSSMetachars

    public static java.lang.String escapeCSSMetachars(java.lang.String s)

  Escapes CSS meta-characters in string according to jQuery selectors document.

  Parameters:
    `s` - `String` to escape meta-characters in
  Returns:
    string with escaped characters.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.