Package com.google.gxp.base

Examples of com.google.gxp.base.GxpContext$Builder


    log.info("User context: " + userContext);
    writeAccountRecordFromContext();

    resp.setContentType("text/html");
    resp.setCharacterEncoding("UTF-8");
    AuthPopup.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, null);
  }
View Full Code Here


  private void writeRegularError(HttpServletRequest req, HttpServletResponse resp,
      String errorMessage) throws IOException {
    resp.setContentType("text/html");
    resp.setCharacterEncoding("UTF-8");
    AuthPopup.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, errorMessage);
  }
View Full Code Here

  private void writeErrorResponse(HttpServletRequest req, HttpServletResponse resp,
      String errorMessage) throws IOException {
    ErrorVarsGsonImpl errorVars = new ErrorVarsGsonImpl();
    errorVars.setErrorMessage(errorMessage);
    setResponseHeaders(resp);
    Wave.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, clientVarString(null, null, errorVars), true,
        inlineNocacheJs(), channelApiUrl);
  }
View Full Code Here

              wave.getUdw().getConnectResult()));
      udwLoadData.setSnapshot(wave.getUdw().getSnapshot());
      vars.setUdw(udwLoadData);
    }
    setResponseHeaders(resp);
    Wave.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, clientVarString(vars, null, null), true,
        inlineNocacheJs(), channelApiUrl);
  }
View Full Code Here

    vars.setUserEmail(participantId.getAddress());
    vars.setHaveOauthToken(userContext.hasOAuthCredentials());
    vars.setConvObjectId(wave.getConvObjectId().getId());
    vars.setConvSnapshot(wave.getConvSnapshotWithDiffs());
    setResponseHeaders(resp);
    Wave.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, clientVarString(null, vars, null), true,
        inlineNocacheJs(), channelApiUrl);
  }
View Full Code Here

    this.resp = resp;
    this.analyticsAccount = analyticsAccount;
  }

  public void write(String title, String userEmail, HtmlClosure content) throws IOException {
    PageSkin.write(resp.getWriter(), new GxpContext(AbstractHandler.getLocale(req)),
        analyticsAccount, title, userEmail, content);
  }
View Full Code Here

    String displayQuery = query.equals(DEFAULT_QUERY) ? "" : query;
    List<InboxDisplayRecord> waveRecords = searcher.searchWaves(query,
        page * RESULTS_PER_PAGE, RESULTS_PER_PAGE);
    boolean embedded = "true".equals(req.getParameter("embedded"));
    NoSkin.write(resp.getWriter(), new GxpContext(getLocale(req)),
        "Walkaround", analyticsAccount,
        InboxFragment.getGxpClosure(xsrfHelper.createToken(XSRF_ACTION), displayQuery,
            embedded, embedded ? "wave" : "", waveRecords,
            // Only show announcement if mobile.
            RequestUtil.isMobile(req) ? announcementHtml() : null,
View Full Code Here

    Map<String, List<BlobKey>> blobs = blobstoreService.getUploads(req);
    List<BlobKey> blobKeys = blobs.get(ATTACHMENT_UPLOAD_PARAM);
    log.info("blobKeys: " + blobKeys);
    BlobKey blobKey = Iterables.getOnlyElement(blobKeys);
    AttachmentId newId = rawAttachmentService.turnBlobIntoAttachment(blobKey);
    UploadResult.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, newId.getId());
  }
View Full Code Here

  public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    String formAction = blobstoreService.createUploadUrl("/upload");
    if (formAction == null) {
      throw new RuntimeException("Null blobstore upload url");
    }
    UploadForm.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, formAction);
  }
View Full Code Here

    @Inject @Flag(FlagName.ANALYTICS_ACCOUNT) String analyticsAccount;

    @Override
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
      resp.setContentType("text/html");
      AuthPopup.write(resp.getWriter(), new GxpContext(getLocale(req)),
          analyticsAccount, null);
    }
View Full Code Here

TOP

Related Classes of com.google.gxp.base.GxpContext$Builder

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.