Class WidgetOverride

java.lang.Object
org.zkoss.zk.ui.metainfo.WidgetListener
org.zkoss.zk.ui.metainfo.WidgetOverride
All Implemented Interfaces:
Serializable, Condition

public class WidgetOverride extends WidgetListener
Represents a method of the peer widget. Unlike WidgetListener, WidgetListener.getScript(org.zkoss.zk.ui.Component) must be a complete function declaration: function (arg..) {...}
Since:
5.0.0
Author:
tomyeh
See Also:
  • Constructor Details

    • WidgetOverride

      public WidgetOverride(EvaluatorRef evalr, String name, String script, ConditionImpl cond)
      Parameters:
      evalr - the evaluator reference used to evaluate the condition.
      name - the the method name, such as setValue.
      Throws:
      IllegalArgumentException - if script is null or (cond is not null but evalr is null)
  • Method Details

    • assign

      public void assign(Component comp)
      Overrides:
      assign in class WidgetListener
    • 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.