org.zkoss.zk.ui.metainfo
Class ZkInfo

java.lang.Object
  extended by org.zkoss.zk.ui.metainfo.NodeInfo
      extended by org.zkoss.zk.ui.metainfo.ComponentInfo
          extended by org.zkoss.zk.ui.metainfo.ZkInfo
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, Condition

public class ZkInfo
extends ComponentInfo

Represents the zk element in a ZUML page.

Since:
3.5.0
Author:
tomyeh
See Also:
Serialized Form

Constructor Summary
ZkInfo(NodeInfo parent)
          Constructs a ZK info.
 
Method Summary
 java.lang.Object[] resolveCase(Page page, Component comp)
          Returns the case condition's value, or null if no case is specified (i.e., withCase() is fasle.
 java.lang.Object resolveSwitch(Page page, Component comp)
          Returns the switch condition's value; evaluate EL expression if any.
 void setCase(java.lang.String casec)
          Sets the case condition.
 void setSwitch(java.lang.String switchc)
          Sets the swith condition.
 boolean withCase()
          Returns whether the case condition is defined.
 boolean withSwitch()
          Returns whether the switch condition is defined.
 
Methods inherited from class org.zkoss.zk.ui.metainfo.ComponentInfo
addAnnotation, addAnnotation, addEventHandler, addProperty, addProperty, addWidgetListener, addWidgetOverride, appendChild, applyProperties, clone, duplicate, evalProperties, getAnnotationMap, getApply, getComponentDefinition, getEvaluator, getEvaluatorRef, getEventHandlerNames, getForward, getFulfill, getImplementation, getLanguageDefinition, getPageDefinition, getParent, getProperties, getReplaceableText, getTag, getTextAs, isBlankPreserved, isEffective, isEffective, newInstance, newInstance, readExternal, resolveComposer, resolveForEach, resolveImplementationClass, resolveImplementationClass, setApply, setCondition, setForEach, setForward, setFulfill, setImplementation, setParent, setReplaceableText, toString, withCondition, withForEach, writeExternal
 
Methods inherited from class org.zkoss.zk.ui.metainfo.NodeInfo
appendChild, appendChild, appendChild, appendChild, getChildren, removeChild, removeChild, removeChild, removeChild
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZkInfo

public ZkInfo(NodeInfo parent)
Constructs a ZK info.

Method Detail

withSwitch

public boolean withSwitch()
Returns whether the switch condition is defined.


setSwitch

public void setSwitch(java.lang.String switchc)
Sets the swith condition.

Parameters:
switchc - the switch condition; EL allowed. Ignored if null. Note: if it is an empty string, the switch condition (returned by resolveSwitch(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Component)) is an empty string.

resolveSwitch

public java.lang.Object resolveSwitch(Page page,
                                      Component comp)
Returns the switch condition's value; evaluate EL expression if any.

Note: unlike resolveCase(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Component), it might return null even if withSwitch() is true.


withCase

public boolean withCase()
Returns whether the case condition is defined.


setCase

public void setCase(java.lang.String casec)
Sets the case condition.


resolveCase

public java.lang.Object[] resolveCase(Page page,
                                      Component comp)
Returns the case condition's value, or null if no case is specified (i.e., withCase() is fasle. It evaluates EL expression if any.



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