org.zkoss.zk.ui.metainfo
Class WidgetAttribute

java.lang.Object
  extended by org.zkoss.zk.ui.metainfo.WidgetAttribute
All Implemented Interfaces:
java.io.Serializable, Condition

public class WidgetAttribute
extends java.lang.Object

Represents a DOM attribute of the peer widget.

Since:
5.0.3
Author:
tomyeh
See Also:
WidgetListener, Serialized Form

Field Summary
protected  java.lang.String _name
           
protected  ExValue _value
           
 
Constructor Summary
WidgetAttribute(EvaluatorRef evalr, java.lang.String name, java.lang.String value, ConditionImpl cond)
           
 
Method Summary
 void assign(Component comp)
           
 ConditionImpl getCondition()
          Returns the effectiveness condition.
 EvaluatorRef getEvaluatorRef()
          Returns the evaluator reference.
 java.lang.String getName()
          Returns the event name, such as, onClick.
 java.lang.String getRawValue()
          Returns the value passed to the constructor.
 java.lang.String getValue(Component comp)
          Returns the value associated with this event handler.
 boolean isEffective(Component comp)
          Used to evaluate whether it is effective.
 boolean isEffective(Page page)
          Used to evaluate whether it is effective.
 void setCondition(ConditionImpl cond)
          Sets the effectiveness condition.
 boolean withCondition()
          Tests if the condition is set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 onClick
value - 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: Condition
Used to evaluate whether it is effective.

Specified by:
isEffective in interface Condition
Parameters:
comp - used as the self variable. Ignored if null.

isEffective

public boolean isEffective(Page page)
Description copied from interface: Condition
Used to evaluate whether it is effective.

Specified by:
isEffective in interface Condition
Parameters:
page - used as the self variable. Ignored if null.


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo