Package org.zkoss.zk.ui.metainfo
Class WidgetListener
java.lang.Object
org.zkoss.zk.ui.metainfo.WidgetListener
- All Implemented Interfaces:
Serializable,Condition
- Direct Known Subclasses:
WidgetOverride
Represents a client-side event listener for the peer widget.
Notice that, unlike
WidgetOverride, getScript(org.zkoss.zk.ui.Component) has only
the function's body (without function (event)).- Since:
- 5.0.0
- Author:
- tomyeh
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWidgetListener(EvaluatorRef evalr, String name, String script, ConditionImpl cond) -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the effectiveness condition.Returns the evaluator reference.getName()Returns the event name, such as, onClick.Returns the script passed to the constructor.Returns the script associated with this event handler.booleanisEffective(Component comp) Used to evaluate whether it is effective.booleanisEffective(Page page) Used to evaluate whether it is effective.voidsetCondition(ConditionImpl cond) Sets the effectiveness condition.booleanTests if the condition is set
-
Field Details
-
_name
-
_script
-
-
Constructor Details
-
WidgetListener
- Parameters:
name- the event name, such as onClickscript- the script snippet. EL is allowed.- Throws:
IllegalArgumentException- if name or script is null
-
-
Method Details
-
getName
Returns the event name, such as, onClick. -
getScript
Returns the script associated with this event handler.- Since:
- 5.0.2
-
getRawScript
Returns the script passed to the constructor. In other words, it might contains EL.- Since:
- 5.0.2
-
assign
-
getEvaluatorRef
Returns the evaluator reference. -
getCondition
Returns the effectiveness condition. -
setCondition
Sets the effectiveness condition. -
withCondition
public boolean withCondition()Tests if the condition is set -
isEffective
Description copied from interface:ConditionUsed to evaluate whether it is effective.- Specified by:
isEffectivein interfaceCondition- Parameters:
comp- used as the self variable. Ignored if null.
-
isEffective
Description copied from interface:ConditionUsed to evaluate whether it is effective.- Specified by:
isEffectivein interfaceCondition- Parameters:
page- used as the self variable. Ignored if null.
-