org.wings.script
Class JavaScriptDOMListener
java.lang.Object
org.wings.script.JavaScriptListener
org.wings.script.JavaScriptDOMListener
- All Implemented Interfaces:
- EventListener, ScriptListener
- Direct Known Subclasses:
- PopupListener
public class JavaScriptDOMListener
- extends JavaScriptListener
Specialized ScriptListener for DOM events. The original JavaScriptListener
uses inline events (e.g.
), this one the events of
the DOM.
- Author:
- Christian Schyma
|
Method Summary |
String |
getScript()
Returns executable code to initialize the JavaScript listener for the
given component. |
JavaScriptDOMListener
public JavaScriptDOMListener(String event,
String code,
SComponent component)
- Parameters:
event - one of JavaScriptDOMEvent (e.g. JavaScriptDOMEvent.ON_CLICK) to act oncode - callback function fired on eventcomponent - the component this listener is associated with
JavaScriptDOMListener
public JavaScriptDOMListener(String event,
String code,
String customObject,
SComponent component)
- Parameters:
event - one of JavaScriptDOMEvent (e.g. JavaScriptDOMEvent.ON_CLICK) to act oncode - callback function fired on eventcustomObject - object that is used for the execution scope (so it becomes "this" in the callback) instead of
the default execution scope of the element the event was fired uponcomponent - the component this listener is associated with
getScript
public String getScript()
- Returns executable code to initialize the JavaScript listener for the
given component.
- Specified by:
getScript in interface ScriptListener- Overrides:
getScript in class JavaScriptListener
- Returns:
- init code
wingS Swings ;-)