Package com.google.gxp.base

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


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

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


    if (!userService.isUserAdmin()) {
      log.severe("Admin page requested by non-admin user!");
      throw new BadRequestException();
    }
    resp.setContentType("text/html");
    Admin.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, EMPTY_CONTENT);
  }
View Full Code Here

            return a.getName().compareTo(b.getName());
          }
        });

    resp.setContentType("text/html");
    Admin.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, FlagsFragment.getGxpClosure(records, rawFlags));
  }
View Full Code Here

    HtmlClosure content = StoreViewFragment.getGxpClosure(
        storeType, id, objectVersion == null ? "" : ("" + objectVersion),
        historyStart, historyEnd, items, snapshotVersion, snapshot);
    resp.setContentType("text/html");
    Admin.write(resp.getWriter(), new GxpContext(getLocale(req)),
        analyticsAccount, content);
  }
View Full Code Here

     * Tells the GXP to write itself to the output stream.
     */
    public void execute(ActionInvocation actionInvocation) {
        GxpResourceProvider provider = getProvider();
        try {
            getGxpClosure().write(provider.getWriter(), new GxpContext(provider.getLocale(), outputXml));
        } catch (Exception e) {
            throw new RuntimeException("Exception while rendering "
                    + getGxpName()
                    + " coming from "
                    + actionInvocation.getAction().getClass().getName() + ".",
View Full Code Here

   
    String currentUrl = req.getRequestURI();
    // Display the page according to when the user last visited the story
    LivingStoryHtml.write(
        resp.getWriter(),
        new GxpContext(req.getLocale()),
        currentUrl,
        livingStory,
        userLoginService.getUserDisplayName(),
        userLoginService.createLoginUrl(currentUrl),
        userLoginService.createLogoutUrl(currentUrl),
View Full Code Here

public class ContentManagerServlet extends HttpServlet {
  @Override
  public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    ContentManagerHtml.write(
        resp.getWriter(),
        new GxpContext(req.getLocale()),
        new ExternalServiceKeyChain(getServletContext()).getMapsKey());
  }
View Full Code Here

   */
  private void doAuthorizeTokenGet(
      HttpServletRequest req, HttpServletResponse resp, ParticipantId user) throws IOException {
    Preconditions.checkNotNull(user, "User must be supplied");
    // Ask the user for permission.
    OAuthAuthorizeTokenPage.write(resp.getWriter(), new GxpContext(req.getLocale()),
        DataApiTokenContainer.ACCESS_TOKEN_EXPIRATION, getOrGenerateXsrfToken(user));
    resp.setContentType(HTML_CONTENT_TYPE);
    resp.setStatus(HttpServletResponse.SC_OK);
    return;
  }
View Full Code Here

  private void writeRegistrationPage(String message, String responseType, Locale locale,
      HttpServletResponse dest) throws IOException {
    dest.setCharacterEncoding("UTF-8");
    dest.setContentType("text/html;charset=utf-8");
    UserRegistrationPage.write(dest.getWriter(), new GxpContext(locale), domain, message,
        responseType, registrationDisabled, analyticsAccount);
  }
View Full Code Here

    }
  }

  private void render(HttpServletRequest req, HttpServletResponse resp,
      String query, List<Object> results) throws IOException {
    GqlServletHtml.write(resp.getWriter(), new GxpContext(req.getLocale()), query, results);
  }
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.