org.zkoss.zk.ui.metainfo
Class HeaderInfo

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

public class HeaderInfo
extends java.lang.Object
implements Condition

Represents a header element, such as <?link> and <?meta> directives on the ZUML page. They are usually represented as directives in ZUML. For example, the link and meta directives represent <link> and <meta> HTML tags, respectively.

Notice

It is not serializable.

Author:
tomyeh
See Also:
Serialized Form

Constructor Summary
HeaderInfo(EvaluatorRef evalr, java.lang.String name, java.util.Map attrs, ConditionImpl cond)
          Constructor.
 
Method Summary
 java.lang.String getName()
          Returns the tag name of this header element.
 boolean isEffective(Component comp)
          Used to evaluate whether it is effective.
 boolean isEffective(Page page)
          Used to evaluate whether it is effective.
 java.lang.String toHTML(Page page)
          Returns as HTML tag(s) representing this header element.
 java.lang.String toHTML(PageDefinition pgdef, Page page)
          Deprecated. As of release 5.0.0, replaced with toHTML(Page).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderInfo

public HeaderInfo(EvaluatorRef evalr,
                  java.lang.String name,
                  java.util.Map attrs,
                  ConditionImpl cond)
Constructor.

Note: it detects the href attribute (from the attrs argument), and encodes it with Executions.encodeURL(java.lang.String).

Parameters:
name - the tag name, such as link (never null or empty).
attrs - a map of (String, String) attributes.
Method Detail

getName

public java.lang.String getName()
Returns the tag name of this header element.


toHTML

public java.lang.String toHTML(Page page)
Returns as HTML tag(s) representing this header element.

Notice that it does NOT invoke isEffective(org.zkoss.zk.ui.Component), so the caller has to call it first.

Parameters:
page - the page containing this header element. It is used to evaluate EL expression, if any, contained in the value.
Since:
5.0.0

toHTML

public java.lang.String toHTML(PageDefinition pgdef,
                               Page page)
Deprecated. As of release 5.0.0, replaced with toHTML(Page).


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-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo