Exemplo n.º 1
0
  void beginRender(MarkupWriter writer) {
    writer.element("select", "name", getControlName(), "id", getClientId());

    putPropertyNameIntoBeanValidationContext("value");

    validate.render(writer);

    removePropertyNameFromBeanValidationContext();

    resources.renderInformalParameters(writer);

    decorateInsideField();

    // Disabled is via a mixin

    if (this.zone != null) {
      Link link = resources.createEventLink(CHANGE_EVENT);

      JSONObject spec =
          new JSONObject("selectId", getClientId(), "zoneId", zone, "url", link.toURI());

      javascriptSupport.addInitializerCall("linkSelectToZone", spec);
    }
  }
Exemplo n.º 2
0
  public void sendRedirect(Link link) throws IOException {
    assert link != null;
    String redirectURL = encodeRedirectURL(link.toRedirectURI());

    sendRedirect(redirectURL);
  }
Exemplo n.º 3
0
  /**
   * TODO: Perhaps we should also render a floating <div> that will explain to the user that
   * geolocation data is being requested to determine the time zone.
   */
  @Import(library = "time-zone-identifier.js")
  void beginRender() {
    Link link = resources.createEventLink("identifyTimeZone");

    jsSupport.addInitializerCall("identifyClientTimeZone", link.toURI());
  }