Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces Core API 4.1.0.20110910-M2
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` | `appendEncoded(java.lang.Appendable appendable, java.lang.Object obj)`
`static void` | `appendEncodedString(java.lang.Appendable appendable, java.lang.Object obj)`
`static void` | `appendScript(java.lang.Appendable appendable, 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` | `getMD5scriptHash(java.lang.String script)`
`static java.lang.String` | `getValidJavascriptName(java.lang.String script)`
`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` | `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:

### appendScript

    public static void appendScript(java.lang.Appendable appendable,
                                    java.lang.Object obj)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

### appendEncodedString

    public static void appendEncodedString(java.lang.Appendable appendable,
                                           java.lang.Object obj)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### appendEncoded

    public static void appendEncoded(java.lang.Appendable appendable,
                                     java.lang.Object obj)
                              throws java.io.IOException

  Throws:
    `java.io.IOException`

### getValidJavascriptName

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

### getMD5scriptHash

    public static java.lang.String getMD5scriptHash(java.lang.String script)

### 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
| RichFaces Core API 4.1.0.20110910-M2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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