org.zkoss.jsf.zul.impl
Class BaseZScript

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.zkoss.jsf.zul.impl.AbstractComponent
              extended by org.zkoss.jsf.zul.impl.BaseZScript
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
ZScript

public class BaseZScript
extends AbstractComponent

The Base implementation of ZScript. This component should be declared nested under Page.

Author:
Dennis.Chen

Field Summary
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
BaseZScript()
           
 
Method Summary
 void encodeBegin(javax.faces.context.FacesContext context)
          Override method, We Construct ZUL JSF Component tree here.
 void encodeEnd(javax.faces.context.FacesContext context)
          Override Method
protected  org.zkoss.jsf.zul.impl.ComponentInfo getComponentInfo()
          return ComponentInfo of RootComponent
 java.lang.String getLanguage()
          Returns the name of the scripting language in this ZScript tag.
 boolean isDeferred()
          Returns whether to defer the execution of this zscript.
 void loadZULTree(org.zkoss.zk.ui.Page page, java.io.StringWriter writer)
          Call by RootComponent or BranchComponent to load tree structure of zk zul components.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Override Method, restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Override Method, save the state of this component.
 void setDeferred(boolean deferred)
          Sets whether to defer the execution of this zscript.
 void setLanguage(java.lang.String lang)
          Sets the name of the scripting language in this ZScript tag.
 
Methods inherited from class org.zkoss.jsf.zul.impl.AbstractComponent
findAncestorWithClass, getBodyContent, getFacesContext, getFamily, getIf, getUnless, isEffective, isSuppressed, restoreAttachedMapState, saveAttachedMapState, setBodyContent, setIf, setSuppressed, setUnless
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseZScript

public BaseZScript()
Method Detail

loadZULTree

public void loadZULTree(org.zkoss.zk.ui.Page page,
                        java.io.StringWriter writer)
                 throws java.io.IOException
Description copied from class: AbstractComponent
Call by RootComponent or BranchComponent to load tree structure of zk zul components. This method is invoked from a RootComponent's encodeEnd() or a BranchComponent's loadZK(). It will go through all ZULJSF Component Tree to initial ZUL Component of corresponding ZULJSFComponent.
Note: Do nothing in default implementation.

Overrides:
loadZULTree in class AbstractComponent
Throws:
java.io.IOException

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Override method, We Construct ZUL JSF Component tree here. This method is called by JSF implementation, deriving class rarely need to invoke this method.

Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws java.io.IOException
Override Method

Overrides:
encodeEnd in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

getComponentInfo

protected org.zkoss.jsf.zul.impl.ComponentInfo getComponentInfo()
return ComponentInfo of RootComponent

Overrides:
getComponentInfo in class AbstractComponent
Returns:
a ComponentInfo of current Component Tree

isDeferred

public boolean isDeferred()
Returns whether to defer the execution of this zscript.

Default: false.


setDeferred

public void setDeferred(boolean deferred)
Sets whether to defer the execution of this zscript.

Parameters:
deferred - whether to defer the execution.

getLanguage

public java.lang.String getLanguage()
Returns the name of the scripting language in this ZScript tag.

Default: null (use what is defined in PageTag).

Returns:
the name of the scripting language in this ZScript tag.

setLanguage

public void setLanguage(java.lang.String lang)
Sets the name of the scripting language in this ZScript tag.

Default: Java.

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

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Description copied from class: AbstractComponent
Override Method, save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class AbstractComponent

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Description copied from class: AbstractComponent
Override Method, restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class AbstractComponent


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