use of org.apache.tapestry5.annotations.AfterRender in project flowlogix by flowlogix.
the class SessionMonitor method afterRender.
@AfterRender
public void afterRender() {
Link link = componentResources.createEventLink(eventName);
String baseURI = link.toAbsoluteURI(request.isSecure());
int index = baseURI.indexOf(":" + eventName);
String defaultURIparameters = baseURI.substring(index + eventName.length() + 1);
defaultURIparameters += "".equals(defaultURIparameters) ? "?" : "&";
defaultURIparameters += KEEPALIVE_NAME + "=";
baseURI = baseURI.substring(0, index + 1);
JSONObject spec = new JSONObject();
spec.put("contextPath", request.getContextPath());
spec.put("baseURI", baseURI);
spec.put("defaultURIparameters", defaultURIparameters);
spec.put("keepAlive", keepAlive);
spec.put("endOnClose", true);
spec.put("idleCheckSeconds", idleCheck);
spec.put("endedHandler", _endedHandler);
jsSupport.addInitializerCall("sessionMonitor", spec);
}
use of org.apache.tapestry5.annotations.AfterRender in project flowlogix by flowlogix.
the class PeriodicUpdater method afterRender.
@AfterRender
void afterRender() {
final String id = zone.getClientId();
Link link;
if (context == null) {
link = resources.createEventLink(event);
} else {
link = resources.createEventLink(event, context);
}
final JSONObject spec = new JSONObject();
spec.put("period", period);
spec.put("elementId", id);
spec.put("uri", link.toAbsoluteURI());
jsSupport.addInitializerCall("periodicUpdater", spec);
}
use of org.apache.tapestry5.annotations.AfterRender in project tapestry-5 by apache.
the class OverrideMixin method afterRender.
void afterRender(MarkupWriter writer) {
final Element element = writer.getDocument().getElementById(clientElement.getClientId());
element.element("span", "id", "overrideMixin").text(" [Override mixin]");
}
use of org.apache.tapestry5.annotations.AfterRender in project tapestry-5 by apache.
the class Autocomplete method afterRender.
@Import(stylesheet = "typeahead-bootstrap3.css")
void afterRender() {
Link link = resources.createEventLink(EVENT_NAME, context);
JSONObject spec = new JSONObject("id", field.getClientId(), "url", link.toString()).put("minChars", minChars).put("limit", maxSuggestions);
jsSupport.require("t5/core/autocomplete").with(spec);
}
use of org.apache.tapestry5.annotations.AfterRender in project tapestry-5 by apache.
the class AssetDemo method afterRender.
@Import(stylesheet = "context:css/via-import.css")
void afterRender() {
javascriptSupport.importStylesheet(new StylesheetLink(ieOnly, new StylesheetOptions(null, "IE")));
javascriptSupport.importJavaScriptLibrary(getAssetWithWrongChecksumUrl());
}
Aggregations