Annotation Type HxRequest
Mark a controller method as handling Htmx requests and potentially restrict
the handler to only be used for specific Htmx target or Htmx trigger.
Controller methods with @HxRequest require the HX-Request
HTTP Header to be set for the handler to process the request. Additionally,
we can specify target(), triggerId(), or triggerName()
such that the handler is only invoked specifically for requests with those
matching headers.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionRestricts the mapping to theidof a specific target element.Restricts the mapping to theidof a specific triggered element.Restricts the mapping to thenameof a specific triggered element.Restricts the mapping to theid, if any, or to thenameof a specific triggered element.
-
Element Details
-
target
-
triggerId
String triggerIdRestricts the mapping to theidof a specific triggered element.- See Also:
- Default:
""
-
triggerName
String triggerNameRestricts the mapping to thenameof a specific triggered element.- See Also:
- Default:
""
-
value
String valueRestricts the mapping to theid, if any, or to thenameof a specific triggered element.If you want to be explicit use
triggerId()ortriggerName().- See Also:
- Default:
""
-