コード例 #1
0
ファイル: Select.java プロジェクト: agileowl/tapestry-5
  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);
    }
  }
コード例 #2
0
ファイル: ResponseImpl.java プロジェクト: agileowl/tapestry-5
  public void sendRedirect(Link link) throws IOException {
    assert link != null;
    String redirectURL = encodeRedirectURL(link.toRedirectURI());

    sendRedirect(redirectURL);
  }
コード例 #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());
  }