org.zkoss.jsp.zul.impl
Class RootTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by org.zkoss.jsp.zul.impl.AbstractTag
          extended by org.zkoss.jsp.zul.impl.RootTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
Direct Known Subclasses:
PageTag

public abstract class RootTag
extends AbstractTag

A skeletal class to implement the root ZK tag. Currently, only the page tag (PageTag) extends from this class.

The derive may override init(org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Page) to initialize the page.

Author:
tomyeh

Constructor Summary
protected RootTag()
          protected Constractor.
 
Method Summary
 void addChildTag(ComponentTag child)
          Adds a child tag.
 void doTag()
          To process this root tag.
 org.zkoss.zk.ui.Page getPage()
           
 java.lang.String getZScriptLanguage()
          Returns the default scripting language.
protected  void init(org.zkoss.zk.ui.Execution exec, org.zkoss.zk.ui.Page page)
          Initializes the page.
 void processZScript(org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.metainfo.ZScript zs)
          Root tag was supposed to handle all children's ZScript.
 void setZscriptLanguage(java.lang.String lang)
          Sets the defult scripting language in this Root tag.
 void setZScriptLanguage(java.lang.String lang)
          Sets the defult scripting language in this Root tag.
 
Methods inherited from class org.zkoss.jsp.zul.impl.AbstractTag
getIf, getUnless, isEffective, setIf, setUnless
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootTag

protected RootTag()
protected Constractor. Constract a RootTag with LanguageDefinition = "xul/html".

Method Detail

getPage

public org.zkoss.zk.ui.Page getPage()
Returns:
the current ZK Page of this jsp page.

addChildTag

public void addChildTag(ComponentTag child)
Adds a child tag.


getZScriptLanguage

public java.lang.String getZScriptLanguage()
Returns the default scripting language.


setZScriptLanguage

public void setZScriptLanguage(java.lang.String lang)
Sets the defult scripting language in this Root tag.

Default: Java.

Parameters:
lang - the name of the scripting language, such as Java, Ruby and Groovy.

setZscriptLanguage

public void setZscriptLanguage(java.lang.String lang)
Sets the defult scripting language in this Root tag. It is the same as setZScriptLanguage(java.lang.String) (used to simplify the typing in JSP page).


init

protected void init(org.zkoss.zk.ui.Execution exec,
                    org.zkoss.zk.ui.Page page)
Initializes the page. It is called after the page is created, and before any component is created.

Default: does nothing

Parameters:
exec - the execution. Note: when this method is called, the execution is not activated. For example, Executions.getCurrent() returns null.
page - the page

doTag

public void doTag()
           throws javax.servlet.jsp.JspException,
                  java.io.IOException
To process this root tag. The deriving class rarely need to override this method.

Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag
Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
Throws:
javax.servlet.jsp.JspException
java.io.IOException

processZScript

public void processZScript(org.zkoss.zk.ui.Component parent,
                           org.zkoss.zk.ui.metainfo.ZScript zs)
                    throws java.io.IOException
Root tag was supposed to handle all children's ZScript.

Parameters:
parent - The owner of zscript segment.
zs - A ZScript object.
Throws:
java.io.IOException


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.