templates.ui.ftlh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of generator Show documentation
Show all versions of generator Show documentation
J2CL compatible Jakarta CDI-like dependency injection framework ui generator
The newest version!
<#if initRootElement>
@jsinterop.annotations.JsFunction
private interface HTMLElementAccessor {
elemental2.dom.HTMLElement getElement();
}
#if>
private final EventHandlerRegistration eventHandlerRegistration = new EventHandlerRegistration();
private static boolean isInjected = false;
private void setAndInitTemplate(${bean} instance, Interceptor interceptor) {
<#if css??>
if (!isInjected) {
StyleInjector.fromString("${css?no_esc}").inject();
isInjected = true;
}
#if>
<#if initRootElement>
elemental2.core.Reflect.set(instance, "__root_element__", elemental2.dom.DomGlobal.document.createElement("div"));
interceptor.addGetMethodInterceptor(Reflect.objectProperty("${rootElementPropertyName}", instance), new java.util.function.BiFunction
© 2015 - 2025 Weber Informatics LLC | Privacy Policy