Package org.zkoss.zk.ui.sys

Examples of org.zkoss.zk.ui.sys.PageCtrl


   */
  public static final
  void outPageContent(Execution exec, Page page, Writer out, boolean au)
  throws IOException {
    final Desktop desktop = page.getDesktop();
    final PageCtrl pageCtrl = (PageCtrl)page;
    final Component owner = pageCtrl.getOwner();
    boolean contained = owner == null && exec.isIncluded();
      //a standalong page (i.e., no owner), and being included by
      //non-ZK page (e.g., JSP).
      //
      //Revisit Bug 2001707: OK to use exec.isIncluded() since
View Full Code Here


  protected
  void renderDesktop(Execution exec, Page page, Writer out)
  throws IOException {
    HtmlPageRenders.setContentType(exec, page);

    final PageCtrl pageCtrl = (PageCtrl)page;
    write(out, HtmlPageRenders.outFirstLine(exec, page)); //might null
    write(out, HtmlPageRenders.outDocType(exec, page)); //might null
    out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\"");
    write(out, pageCtrl.getRootAttributes());
    out.write(">\n<head>\n"
      +"<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n"
      +"<meta http-equiv=\"Expires\" content=\"-1\" />\n"
      +"<title>");
    write(out, page.getTitle());
View Full Code Here

  /** Initializes a page after execution is activated.
   * It setup the identifier and title, and adds it to desktop.
   */
  public void init(final Page page, final boolean evalHeaders) {
    final PageCtrl pageCtrl = (PageCtrl)page;
    pageCtrl.init(
      new PageConfig() {
        public String getId() {return _id;}
        public String getUuid() {return null;}
        public String getTitle() {return _title;}
        public String getStyle() {return _style;}
        public String getHeaders(boolean before) {
          return evalHeaders ?
            PageDefinition.this.getHeaders(page, before): "";
        }
        public String getHeaders() {
          return evalHeaders ?
            PageDefinition.this.getHeaders(page): "";
        }
        public Collection getResponseHeaders() {
          return evalHeaders ?
            PageDefinition.this.getResponseHeaders(page):
              Collections.EMPTY_LIST;
        }
      });

    String s = getRootAttributes(page);
    if (s != null) pageCtrl.setRootAttributes(s);

    s = getContentType(page);
    if (s != null) pageCtrl.setContentType(s);

    s = getDocType(page);
    if (s != null) pageCtrl.setDocType(s);

    s = getFirstLine(page);
    if (s != null) pageCtrl.setFirstLine(s);

    if (_cacheable != null) pageCtrl.setCacheable(_cacheable);
    if (_autoTimeout != null) pageCtrl.setAutomaticTimeout(_autoTimeout);
    if (_expfcls != null) page.setExpressionFactoryClass(_expfcls);
    page.setComplete(_complete);
  }
View Full Code Here

      }
      _spush = null;
    }

    for (Iterator it = _pages.iterator(); it.hasNext();) {
      final PageCtrl pgc = (PageCtrl)it.next();
      try {
        pgc.destroy();
      } catch (Throwable ex) {
        log.warning("Failed to destroy "+pgc, ex);
      }
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.sys.PageCtrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.