Package org.zkoss.zk.au

Examples of org.zkoss.zk.au.AuWriter


    final Execution exec =
      new ExecutionImpl(_ctx, request, response, desktop, null);
    if (sid != null)
      ((ExecutionCtrl)exec).setRequestId(sid);

    final AuWriter out = AuWriters.newInstance();
    out.setCompress(_compress);
    out.open(request, response,
      desktop.getDevice().isSupported(Device.RESEND) ?
        getProcessTimeout(config.getResendDelay()): 0);
        //Note: getResendDelay() might return nonpositive
    try {
      wappc.getUiEngine().execUpdate(exec, aureqs, out);
    } catch (RequestOutOfSequenceException ex) {
      log.warning(ex.getMessage());
      response.setHeader("ZK-SID", sid);
      response.setIntHeader("ZK-Error", AuResponse.SC_OUT_OF_SEQUENCE);
    }
    out.close(request, response);
  }
View Full Code Here


  throws ServletException, IOException {
    final String sid = request.getHeader("ZK-SID");
    if (sid != null)
      response.setHeader("ZK-SID", sid);

    final AuWriter out =
      AuWriters.newInstance().open(request, response, 0);

    if (!getAuDecoder(wapp).isIgnorable(request, wapp)) {
      final String deviceType = getDeviceType(request);
      URIInfo ui = wapp != null ? (URIInfo)wapp.getConfiguration()
        .getTimeoutURI(getDeviceType(request)): null;
      String uri = ui != null ? ui.uri: null;
      final AuResponse resp;
      if (uri != null) {
        if (uri.length() != 0)
          uri = Encodes.encodeURL(_ctx, request, response, uri);
        resp = new AuSendRedirect(uri, null);
      } else {
        resp = new AuObsolete(
          dtid, Messages.get(MZk.UPDATE_OBSOLETE_PAGE, dtid));
      }
      out.write(resp);
    }

    out.close(request, response);
  }
View Full Code Here

   */
  private static void responseError(HttpServletRequest request,
  HttpServletResponse response, String errmsg)
  throws IOException {
    //Don't use sendError because Browser cannot handle UTF-8
    AuWriter out = AuWriters.newInstance().open(request, response, 0);
    out.write(new AuAlert(errmsg));
    out.close(request, response);
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.au.AuWriter

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.