Package io.karatelabs.markup
Class HxDialect
java.lang.Object
org.thymeleaf.dialect.AbstractDialect
org.thymeleaf.dialect.AbstractProcessorDialect
io.karatelabs.markup.HxDialect
- All Implemented Interfaces:
org.thymeleaf.dialect.IDialect,org.thymeleaf.dialect.IProcessorDialect
public class HxDialect
extends org.thymeleaf.dialect.AbstractProcessorDialect
Thymeleaf dialect for HTMX support.
Provides processors for ka:get, ka:post, ka:put, ka:patch, ka:delete, ka:vals, ka:target, ka:swap, etc.
These are converted to their hx-* equivalents during template processing.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new HxDialect with default configuration (no context path).HxDialect(MarkupConfig config) Create a new HxDialect with the given markup configuration.Create a new HxDialect with the given context path. -
Method Summary
Modifier and TypeMethodDescriptionGet the context path for this dialect.Set<org.thymeleaf.processor.IProcessor> getProcessors(String dialectPrefix) Methods inherited from class org.thymeleaf.dialect.AbstractProcessorDialect
getDialectProcessorPrecedence, getPrefixMethods inherited from class org.thymeleaf.dialect.AbstractDialect
getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.thymeleaf.dialect.IDialect
getName
-
Constructor Details
-
HxDialect
public HxDialect()Create a new HxDialect with default configuration (no context path). -
HxDialect
Create a new HxDialect with the given markup configuration.- Parameters:
config- the markup configuration (uses contextPath from it)
-
HxDialect
Create a new HxDialect with the given context path.- Parameters:
contextPath- the context path to prepend to HTMX URLs
-
-
Method Details
-
getContextPath
Get the context path for this dialect.- Returns:
- the context path (may be null)
-
getProcessors
-