Class JsStatement

java.lang.Object
org.wicketstuff.wiquery.core.javascript.JsStatement
All Implemented Interfaces:
Serializable

public class JsStatement extends Object implements Serializable
$Id: JsStatement.java 1714M 2012-01-17 08:35:15Z (local) $

A JsStatement defines a whole executable JavaScript statement. The generator eases "jQuery oriented" code, but you can still use another JavaScript coding style with the append(CharSequence) method.

To get a valid instance and to ease JavaScript and Wicket integration, you should use the JsQuery class (example below). This class will initialize a JsStatement and contribute to a WebPage.

The JavaScript generating by a JsStatement is jQuery oriented. Example of generated string:

$(".aClassName").each(function() {alert('foo');});

To generate the script above, you can write this:

new JsQuery().$().each(JsScope.quickScope("alert('foo')"));

Any JsStatement should be returned by a JsQuery within the $ methods.

Since:
0.7
Author:
Lionel Armanet
See Also: