Class PageImpl

java.lang.Object
org.zkoss.zk.ui.AbstractPage
org.zkoss.zk.ui.impl.PageImpl
All Implemented Interfaces:
Serializable, ClassResolver, Scope, IdSpace, Page, PageCtrl
Direct Known Subclasses:
VolatilePage

public class PageImpl extends AbstractPage implements Serializable
An implementation 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 deserialize 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.

Author:
tomyeh
See Also:
  • Constructor Details

    • PageImpl

      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? Constructor 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).
    • PageImpl

      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.
    • PageImpl

      public PageImpl(Page ref)
      Constructs a page with another page as instance
      Since:
      6.0.0
    • PageImpl

      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
  • Method Details