Package com.google.gxp.base

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


      }
      else {
        resp.setStatus(HttpServletResponse.SC_FORBIDDEN);
      }
      resp.setContentType("text/html;charset=utf-8");
      AuthenticationPage.write(resp.getWriter(), new GxpContext(req.getLocale()), domain, "",
          RESPONSE_STATUS_NONE, isLoginPageDisabled, analyticsAccount);
    }
  }
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

  /**
   * @return a CSS representation of this color to the specified Appendable.
   * Will always be safe to insert into an HTML <style> element.
   */
  public String toString() {
    GxpContext gxpContext = new GxpContext(Locale.US);
    return gxpContext.getString(this);
  }
View Full Code Here

    }
  }

  protected void assertOutputEquals(String expected, Object... params) throws Throwable {
    StringBuilder sb = new StringBuilder();
    invoke(sb, new GxpContext(Locale.US), params);
    assertEquals(expected, sb.toString());
  }
View Full Code Here

    assertEquals(value, m.invoke(null, new Object[] {}));
  }

  protected void assertGxpCompilationError() throws Throwable {
    // precall isTopLevalCall() so the exception isn't caught internally
    GxpContext gxpContext = new GxpContext(Locale.US);
    gxpContext.isTopLevelCall();

    try {
      invoke(new StringBuilder(), gxpContext);
      fail("should have thrown a Gxp compilation exception.");
    } catch (com.google.gxp.base.dynamic.GxpCompilationException.Gxp e) {
View Full Code Here

    }
  }

  protected void assertJavaCompilationError() throws Throwable {
    // precall isTopLevalCall() so the exception isn't caught internally
    GxpContext gxpContext = new GxpContext(Locale.US);
    gxpContext.isTopLevelCall();

    try {
      invoke(new StringBuilder(), gxpContext);
      fail("should have thrown a Java compilation exception.");
    } catch (com.google.gxp.base.dynamic.GxpCompilationException.Java e) {
View Full Code Here

    }
  }

  protected void assertGxpParamChangeError(Object... params) throws Throwable {
    // precall isTopLevalCall() so the exception isn't caught internally
    GxpContext gxpContext = new GxpContext(Locale.US);
    gxpContext.isTopLevelCall();

    try {
      invoke(new StringBuilder(), gxpContext, params);
      fail("should have thrown a gxp param change exception.");
    } catch (com.google.gxp.base.dynamic.GxpCompilationException.GxpParamChange e) {
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

    Cookie secret =
        new Cookie(TokenBasedAccountLookup.SECRET_TOKEN_COOKIE_KEY, xsrfHelper.get().createToken(
            userContext.getOAuthCredentials().getAccessToken()));
    secret.setMaxAge(expirySeconds);
    resp.addCookie(secret);
    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

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.