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); } }
public void sendRedirect(Link link) throws IOException { assert link != null; String redirectURL = encodeRedirectURL(link.toRedirectURI()); sendRedirect(redirectURL); }
/** * 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()); }