org.wicketstuff.push
Class JavaScriptChannelEvent

java.lang.Object
  extended by org.wicketstuff.push.ChannelEvent
      extended by org.wicketstuff.push.JavaScriptChannelEvent

public abstract class JavaScriptChannelEvent
extends ChannelEvent

Usually on sending an event to a channel, the ChannelEvent invokes a javascript method on the client which then starts an Ajax-request. In order to save the additional round-trip, this class has been made. It executes the javascript-code returned by the getJavaScript() method.

Author:
Michael Sparer (msparer)

Field Summary
static java.lang.String KEY
          Setting the event's name to this key makes the client side execute its value
 
Constructor Summary
JavaScriptChannelEvent(java.lang.String channel)
           
 
Method Summary
protected abstract  java.lang.String getJavaScript()
           
 
Methods inherited from class org.wicketstuff.push.ChannelEvent
addData, getChannel, getData, getId, setChannel, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

public static final java.lang.String KEY
Setting the event's name to this key makes the client side execute its value

See Also:
Constant Field Values
Constructor Detail

JavaScriptChannelEvent

public JavaScriptChannelEvent(java.lang.String channel)
Parameters:
channel - the channel name
Method Detail

getJavaScript

protected abstract java.lang.String getJavaScript()
Returns:
javascript code that gets evaluated on the client without making a roundtrip


Copyright © 2010. All Rights Reserved.