Save This Page
Home » zk-src-3.5.1 » org » zkoss » zk » ui » impl » [javadoc | source]
org.zkoss.zk.ui.impl
public class: PageImpl [javadoc | source]
java.lang.Object
   org.zkoss.zk.ui.impl.PageImpl

All Implemented Interfaces:
    PageCtrl, Page, Serializable

An implmentation of Page and PageCtrl . Refer to them for more details.

Note: though PageImpl is serializable, it is designed to work with Web container to enable the serialization of sessions. It is not suggested to serialize and desrialize it directly since many fields might be lost.

On the other hand, it is OK to serialize and deserialize Component .

Implementation Notes:
It is not thread-safe because it is protected by the spec: at most one thread can access a page and all its components at the same time.

Constructor:
 public PageImpl(PageDefinition pgdef) 
    Constructs a page by giving the page definition.

    Note: when a page is constructed, it doesn't belong to a desktop yet. Caller has to invoke #init to complete the creation of a page. Why two phase? Contructor could be called before execution is activated, but #init must be called in an execution.

    Also note that #getId and #getTitle are not ready until #init is called.

    Parameters:
    pgdef - the page definition (never null).
 public PageImpl(Richlet richlet,
    String path) 
    Constructs a page by specifying a richlet.

    Note: when a page is constructed, it doesn't belong to a desktop yet. Caller has to invoke #init to complete the creation of a page.

    Also note that #getId and #getTitle are not ready until #init is called.

    Parameters:
    richlet - the richlet to serve this page.
    path - the request path, or null if not available
 public PageImpl(LanguageDefinition langdef,
    ComponentDefinitionMap compdefs,
    String path,
    String zslang) 
    Constructs a page without page definition and richlet.
    Parameters:
    langdef - the language definition (never null)
    compdefs - the component definition map. If null, an empty map is assumed.
    path - the request path. If null, empty is assumed.
    zslang - the zscript language. If null, "Java" is assumed.
Method from org.zkoss.zk.ui.impl.PageImpl Summary:
addDeferredZScript,   addEventListener,   addFellow,   addFunctionMapper,   addRoot,   addVariableResolver,   containsVariable,   destroy,   getAttribute,   getAttribute,   getAttributes,   getAttributes,   getCacheable,   getComponentDefinition,   getComponentDefinition,   getComponentDefinitionMap,   getContentType,   getDefaultParent,   getDesktop,   getDocType,   getELVariable,   getExpressionFactoryClass,   getFellow,   getFellowIfAny,   getFellows,   getFirstLine,   getFunctionMapper,   getHeaders,   getId,   getInterpreter,   getLanguageDefinition,   getListenerIterator,   getLoadedInterpreters,   getNamespace,   getOwner,   getRequestPath,   getRootAttributes,   getRoots,   getStyle,   getTitle,   getUuid,   getVariable,   getXelVariable,   getZScriptClass,   getZScriptFunction,   getZScriptFunction,   getZScriptFunction,   getZScriptLanguage,   getZScriptMethod,   getZScriptMethod,   getZScriptVariable,   getZScriptVariable,   getZScriptVariable,   hasFellow,   init,   init,   interpret,   invalidate,   isComplete,   isListenerAvailable,   moveRoot,   redraw,   removeAttribute,   removeAttribute,   removeComponents,   removeEventListener,   removeFellow,   removeRoot,   removeVariableResolver,   resolveClass,   sessionDidActivate,   sessionWillPassivate,   setAttribute,   setAttribute,   setCacheable,   setComplete,   setContentType,   setDefaultParent,   setDocType,   setExpressionFactoryClass,   setFirstLine,   setId,   setOwner,   setRootAttributes,   setStyle,   setTitle,   setVariable,   setZScriptLanguage,   toString,   unsetVariable
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.zkoss.zk.ui.impl.PageImpl Detail:
 public  void addDeferredZScript(Component parent,
    ZScript zscript) 
 public boolean addEventListener(String evtnm,
    EventListener listener) 
 public  void addFellow(Component comp) 
 public  void addFunctionMapper(FunctionMapper mapper) 
 public  void addRoot(Component comp) 
 public boolean addVariableResolver(VariableResolver resolver) 
 public boolean containsVariable(String name) 
 public  void destroy() 
 public Object getAttribute(String name) 
 public Object getAttribute(String name,
    int scope) 
 public Map getAttributes() 
 public Map getAttributes(int scope) 
 public Boolean getCacheable() 
 public ComponentDefinition getComponentDefinition(String name,
    boolean recur) 
 public ComponentDefinition getComponentDefinition(Class cls,
    boolean recur) 
 public ComponentDefinitionMap getComponentDefinitionMap() 
 public String getContentType() 
 public Component getDefaultParent() 
 public final Desktop getDesktop() 
 public String getDocType() 
 public Object getELVariable(String name) 
Deprecated! As - of release of 3.0.0, replaced with #getXelVariable .

 public Class getExpressionFactoryClass() 
 public Component getFellow(String compId) 
 public Component getFellowIfAny(String compId) 
 public Collection getFellows() 
 public String getFirstLine() 
 public final FunctionMapper getFunctionMapper() 
 public String getHeaders() 
 public final String getId() 
 public Interpreter getInterpreter(String zslang) 
 public LanguageDefinition getLanguageDefinition() 
 public Iterator getListenerIterator(String evtnm) 
 public Collection getLoadedInterpreters() 
 public final Namespace getNamespace() 
 public final Component getOwner() 
 public String getRequestPath() 
 public String getRootAttributes() 
 public Collection getRoots() 
 public String getStyle() 
 public String getTitle() 
 public final String getUuid() 
 public Object getVariable(String name) 
 public Object getXelVariable(String name) 
 public Class getZScriptClass(String clsnm) 
 public Function getZScriptFunction(String name,
    Class[] argTypes) 
 public Function getZScriptFunction(Namespace ns,
    String name,
    Class[] argTypes) 
 public Function getZScriptFunction(Component comp,
    String name,
    Class[] argTypes) 
 public String getZScriptLanguage() 
 public Method getZScriptMethod(String name,
    Class[] argTypes) 
Deprecated! As - of release 3.0.0, replaced by #getZScriptFunction(String,Class[]) .

 public Method getZScriptMethod(Namespace ns,
    String name,
    Class[] argTypes) 
Deprecated! As - of release 3.0.0, replaced by #getZScriptFunction(String,Class[]) .

 public Object getZScriptVariable(String name) 
 public Object getZScriptVariable(Namespace ns,
    String name) 
 public Object getZScriptVariable(Component comp,
    String name) 
 public boolean hasFellow(String compId) 
 protected  void init() 
    Initialized the page when contructed or deserialized.
 public  void init(PageConfig config) 
 public  void interpret(String zslang,
    String script,
    Namespace ns) 
 public  void invalidate() 
 public boolean isComplete() 
 public boolean isListenerAvailable(String evtnm) 
 public  void moveRoot(Component comp,
    Component refRoot) 
 public  void redraw(Collection responses,
    Writer out) throws IOException 
 public Object removeAttribute(String name) 
 public Object removeAttribute(String name,
    int scope) 
 public  void removeComponents() 
 public boolean removeEventListener(String evtnm,
    EventListener listener) 
 public  void removeFellow(Component comp) 
 public  void removeRoot(Component comp) 
 public boolean removeVariableResolver(VariableResolver resolver) 
 public Class resolveClass(String clsnm) throws ClassNotFoundException 
 public  void sessionDidActivate(Desktop desktop) 
 public  void sessionWillPassivate(Desktop desktop) 
 public Object setAttribute(String name,
    Object value) 
 public Object setAttribute(String name,
    Object value,
    int scope) 
 public  void setCacheable(Boolean cacheable) 
 public  void setComplete(boolean complete) 
 public  void setContentType(String contentType) 
 public  void setDefaultParent(Component comp) 
 public  void setDocType(String docType) 
 public  void setExpressionFactoryClass(Class expfcls) 
 public  void setFirstLine(String firstLine) 
 public  void setId(String id) 
 public final  void setOwner(Component comp) 
 public  void setRootAttributes(String rootAttrs) 
 public  void setStyle(String style) 
 public  void setTitle(String title) 
 public  void setVariable(String name,
    Object val) 
 public  void setZScriptLanguage(String zslang) throws InterpreterNotFoundException 
 public String toString() 
 public  void unsetVariable(String name)