org.apache.myfaces.tobago.renderkit.util
Class JQueryUtils

java.lang.Object
  extended by org.apache.myfaces.tobago.renderkit.util.JQueryUtils

public class JQueryUtils
extends Object


Method Summary
static String escapeId(String id)
          Puts two backslashes before : and . to escape them.
static String escapeSelector(String value)
          Puts two backslashes before #;&,.+*~':"!
static String escapeValue(String value)
          Puts one backslashes before \ to escape it.
static String selectId(String id)
          Creates a selector for an id like jQuery('#id').
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

escapeId

public static String escapeId(String id)
Puts two backslashes before : and . to escape them. Two are needed, because of JavaScript string literals.


escapeValue

public static String escapeValue(String value)
Puts one backslashes before \ to escape it. It is needed, because of JavaScript string literals.


escapeSelector

public static String escapeSelector(String value)
Puts two backslashes before #;&,.+*~':"!^$[]()=>|/ to escape them. Two are needed, because of JavaScript string literals. Puts three backslashes before a \ itself, to escape it.


selectId

public static String selectId(String id)
Creates a selector for an id like jQuery('#id'). The id will be escaped if necessary.



Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.