Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.Execution


  public void invalidate() {
    if (isIdRequired()) super.invalidate();
    else getParent().invalidate();
  }
  public void redraw(Writer out) throws IOException {
    final Execution exec = Executions.getCurrent();
    if (!HtmlPageRenders.isDirectContent(exec)) {
      super.redraw(out);
      return;
    }
View Full Code Here


    final Locator loc = PageDefinitions.getLocator(_wapp, path);
      //we have to retrieve locator before setting execution,
      //since it assumes exec.getDesktop not null
      //which is true except this moment (before desktop is created)

    final Execution exec = ExecutionsCtrl.getCurrent();
    final TemporaryExecution de = new TemporaryExecution(
      _ctx, (HttpServletRequest)request,
      (HttpServletResponse)response, null);
    ExecutionsCtrl.setCurrent(de);
    try {
View Full Code Here

   */
  public static
  Page newPage(UiFactory uf, RequestInfo ri, PageDefinition pagedef,
  ServletResponse response, String path) {
    final DesktopCtrl desktopCtrl = (DesktopCtrl)ri.getDesktop();
    final Execution exec = ExecutionsCtrl.getCurrent();
    TemporaryExecution de = new TemporaryExecution(
      (ServletContext)ri.getWebApp().getNativeContext(),
      (HttpServletRequest)ri.getNativeRequest(),
      (HttpServletResponse)response, ri.getDesktop());
    desktopCtrl.setExecution(de);
View Full Code Here

   */
  public static
  Page newPage(UiFactory uf, RequestInfo ri, Richlet richlet,
  ServletResponse response, String path) {
    final DesktopCtrl desktopCtrl = (DesktopCtrl)ri.getDesktop();
    final Execution exec = ExecutionsCtrl.getCurrent();
    TemporaryExecution de = new TemporaryExecution(
      (ServletContext)ri.getWebApp().getNativeContext(),
      (HttpServletRequest)ri.getNativeRequest(),
      (HttpServletResponse)response, ri.getDesktop());
    desktopCtrl.setExecution(de);
View Full Code Here

  public void redraw(java.io.Writer out) throws java.io.IOException {
    if (_tagnm == null)
      throw new UiException("The tag name is not initialized yet");

    final Execution exec = Executions.getCurrent();
    if (exec == null || exec.isAsyncUpdate(null)
    || !HtmlPageRenders.isDirectContent(exec)) {
      super.redraw(out); //generate JavaScript
      return;
    }
View Full Code Here

    super("html");
  }

  //-- super --//
  public void redraw(java.io.Writer out) throws java.io.IOException {
    final Execution exec = Executions.getCurrent();
    final StringWriter bufout = new StringWriter();
    final Page page = getPage();
    final Object ret = PageRenderer.beforeRenderHtml(exec, page, bufout);
    super.redraw(bufout);
    PageRenderer.afterRenderHtml(exec, page, bufout, ret);
View Full Code Here

 
    if (path != null && path.length() > 0 && path.charAt(0) == '/') {
      final int j = path.lastIndexOf('/');
      path = j > 0 ? path.substring(0, j + 1): "/";
    } else {
      final Execution exec = Executions.getCurrent();
      if (exec != null) path = exec.getDesktop().getCurrentDirectory();
    }
    final Object ctx = wapp.getNativeContext();
    if (ctx instanceof ServletContext)
      return new ServletContextLocator((ServletContext)ctx, path);
    throw new UnsupportedOperationException("Unknown context: "+ctx);
View Full Code Here

  }
  public void removeComponent(Component comp) {
    removeComponent(comp, false);
  }
  private static int getExecId() {
    final Execution exec = Executions.getCurrent();
    return exec != null ? System.identityHashCode(exec): 0;
  }
View Full Code Here

  public String toString() {
    return "[Desktop "+_id+':'+_path+']';
  }

  public void sessionWillPassivate(Session sess) {
    Execution exec = Executions.getCurrent();
    if (exec != null) { //not possible, but just in case
      sessWillPassivate();
    } else {
      exec = new org.zkoss.zk.ui.impl.PhantomExecution(this);
      safeActivate(exec);
View Full Code Here

  }
  public void sessionDidActivate(Session sess) {
    _sess = sess;
    _wapp = sess.getWebApp();

    Execution exec = Executions.getCurrent();
    if (exec != null) { //not possible, but just in case
      sessDidActivate();
    } else {
      exec = new org.zkoss.zk.ui.impl.PhantomExecution(this);
      safeActivate(exec);
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.Execution

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.