public final class ScriptUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
appendEncoded(Appendable appendable,
Object obj) |
static void |
appendEncodedString(Appendable appendable,
Object obj) |
static void |
appendScript(Appendable appendable,
Object obj) |
static String |
escapeCSSMetachars(String s)
Escapes CSS meta-characters in string according to jQuery
selectors document.
|
static String |
getMD5scriptHash(String script) |
static String |
getValidJavascriptName(String script) |
static boolean |
isValidProperty(Object property)
Test for valid value of property.
|
static boolean |
shouldRenderAttribute(Object attributeVal) |
static boolean |
shouldRenderAttribute(String attributeName,
Object attributeVal) |
static String |
toScript(Object obj)
Convert any Java Object to JavaScript representation ( as possible ).
|
static void |
writeToStream(javax.faces.context.ResponseWriter responseWriter,
Object obj)
Convert any Java Object to JavaScript representation ( as possible ) and write it to writer immediately
|
public static void writeToStream(javax.faces.context.ResponseWriter responseWriter, Object obj) throws IOException
responseWriter
- obj
- IOException
public static String toScript(Object obj)
obj
- public static void appendScript(Appendable appendable, Object obj) throws IOException
IOException
public static void appendEncodedString(Appendable appendable, Object obj) throws IOException
IOException
public static void appendEncoded(Appendable appendable, Object obj) throws IOException
IOException
public static boolean shouldRenderAttribute(Object attributeVal)
public static boolean shouldRenderAttribute(String attributeName, Object attributeVal)
public static boolean isValidProperty(Object property)
property
- - value of property returned from UIComponent.getAttributes()
public static String escapeCSSMetachars(String s)
Escapes CSS meta-characters in string according to jQuery selectors document.
s
- String
to escape meta-characters inCopyright © 2016 JBoss by Red Hat. All Rights Reserved.