Package org.zkoss.zk.ui.metainfo
Class WidgetAttribute
- java.lang.Object
-
- org.zkoss.zk.ui.metainfo.WidgetAttribute
-
- All Implemented Interfaces:
java.io.Serializable,Condition
public class WidgetAttribute extends java.lang.ObjectRepresents a DOM attribute of the peer widget.- Since:
- 5.0.3
- Author:
- tomyeh
- See Also:
WidgetListener, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WidgetAttribute(EvaluatorRef evalr, java.lang.String name, java.lang.String value, ConditionImpl cond)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(Component comp)ConditionImplgetCondition()Returns the effectiveness condition.EvaluatorRefgetEvaluatorRef()Returns the evaluator reference.java.lang.StringgetName()Returns the event name, such as, onClick.java.lang.StringgetRawValue()Returns the value passed to the constructor.java.lang.StringgetValue(Component comp)Returns the value 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.booleanwithCondition()Tests if the condition is set
-
-
-
Field Detail
-
_name
protected final java.lang.String _name
-
_value
protected final ExValue _value
-
-
Constructor Detail
-
WidgetAttribute
public WidgetAttribute(EvaluatorRef evalr, java.lang.String name, java.lang.String value, ConditionImpl cond)
- Parameters:
name- the event name, such as onClickvalue- the value. EL is allowed and it will be coerced to String- Throws:
java.lang.IllegalArgumentException- if value is null
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the event name, such as, onClick.
-
getValue
public java.lang.String getValue(Component comp)
Returns the value associated with this event handler.
-
getRawValue
public java.lang.String getRawValue()
Returns the value passed to the constructor. In other words, it might contains EL.
-
assign
public void assign(Component comp)
-
getEvaluatorRef
public EvaluatorRef getEvaluatorRef()
Returns the evaluator reference.
-
getCondition
public ConditionImpl getCondition()
Returns the effectiveness condition.
-
setCondition
public void setCondition(ConditionImpl cond)
Sets the effectiveness condition.
-
withCondition
public boolean withCondition()
Tests if the condition is set
-
isEffective
public boolean isEffective(Component comp)
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
public boolean isEffective(Page page)
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.
-
-