Class 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 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.