|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.script.JavaScriptListener
public class JavaScriptListener
| Field Summary | |
|---|---|
static String |
JS_FORM_SUBMIT_SCRIPT
Use this java script implementation to submit forms on button click |
static JavaScriptListener |
JS_ON_CHANGE_SUBMIT_FORM
Use i.e. |
| Fields inherited from interface org.wings.script.ScriptListener |
|---|
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY |
| Constructor Summary | |
|---|---|
JavaScriptListener(String event,
String code)
|
|
JavaScriptListener(String event,
String code,
SComponent[] components)
The code is parsed and all occurrences of '{0..components.length}' are substituted with that component's id. |
|
JavaScriptListener(String event,
String code,
String script)
|
|
JavaScriptListener(String event,
String code,
String script,
SComponent[] components)
The code is parsed and all occurrences of '{0..components.length}' are substituted with that component's id. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
getCode()
Inline code which should be executed on occuration of this event |
SComponent[] |
getComponents()
|
String |
getEvent()
Event on which this script should be triggered. |
int |
getPriority()
A numeric value which prioritzes the execution order of various script listeners listening on the same event. |
String |
getScript()
Optional, additional script code which should be rendered externally (i.e. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JS_FORM_SUBMIT_SCRIPT
public static final JavaScriptListener JS_ON_CHANGE_SUBMIT_FORM
SComponent.addScriptListener(org.wings.script.ScriptListener) to add this scripts.
| Constructor Detail |
|---|
public JavaScriptListener(String event,
String code)
event - one of 'onclick', 'onmouseover', ..code - the code that is written as a value of the event attribute
public JavaScriptListener(String event,
String code,
String script)
event - one of 'onclick', 'onmouseover', ..code - the code that is written as a value of the event attributescript - larger code block (java script functions), that is written
to a combined script file, that is linked in the header
public JavaScriptListener(String event,
String code,
SComponent[] components)
event - one of 'onclick', 'onmouseover', ..code - the code that is written as a value of the event attributecomponents - the components whose ids are substituted into the code
public JavaScriptListener(String event,
String code,
String script,
SComponent[] components)
event - one of 'onclick', 'onmouseover', ..code - the code that is written as a value of the event attributescript - larger code block (java script functions), that is written
to a separate script file, that is linked in the headercomponents - the components whose ids are substituted into the code| Method Detail |
|---|
public String getEvent()
ScriptListener
getEvent in interface ScriptListenerpublic String getCode()
ScriptListener
getCode in interface ScriptListenerpublic String getScript()
ScriptListener
getScript in interface ScriptListenernullpublic SComponent[] getComponents()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int getPriority()
ScriptListener
getPriority in interface ScriptListenerScriptListener.DEFAULT_PRIORITY if you don't care.
Lower values are executed later (low priority), higher values eraliert (higher priority).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||