java.lang.Object
org.wicketstuff.wiquery.core.javascript.JsUtils

public final class JsUtils extends Object
$Id: JsUtils.java 1714 2011-09-22 20:38:30Z hielke.hoeve $

Helper class to ease JavaScript integration.

Since:
0.7
Author:
Lionel Armanet
  • Method Details

    • array

      public static CharSequence array(CharSequence... args)
      Returns:
      a javascript representation of the array
    • doubleQuotes

      public static String doubleQuotes(CharSequence stringToDoubleQuote)
      Double quotes the given string (eg. makes a JavaScript String).
    • doubleQuotes

      public static String doubleQuotes(CharSequence stringToDoubleQuote, boolean escapeDoubleQuote)
      Double quotes the given string (eg. makes a JavaScript String).
    • escapeDoubleQuote

      public static String escapeDoubleQuote(CharSequence stringToDoubleQuote)
      Returns:
      the sequence with escaped double quotes
    • escapeQuote

      public static String escapeQuote(CharSequence stringToQuote)
      Returns:
      the sequence with escaped quotes
    • implode

      public static String implode(EventLabel... eventLabels)
      Converts the given array of EventLabel to a String.
    • quotes

      public static String quotes(CharSequence stringToQuote)
      Quotes the given string (eg. makes a JavaScript String).
    • quotes

      public static String quotes(CharSequence stringToQuote, boolean escapeQuote)
      Quotes the given string (eg. makes a JavaScript String).
    • string

      public static String string(int value)
      Converts an int to a String. (common alias of valueOf).