Annotation Interface HxLocation


@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface HxLocation
Annotation to do a client side redirect that does not do a full page reload.

Note that this annotation does not provide support for specifying values or headers. If you want to do this, use HtmxResponse instead.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    An event that "triggered" the request
    A callback that will handle the response HTML.
    The url path to make the redirect.
    The source element of the request
    How the response will be swapped in relative to the target
    The target to swap the response into.
    The url path to make the redirect.
  • Element Details

    • value

      @AliasFor("path") String value
      The url path to make the redirect.

      This is an alias for path(). For example, @HxLocation("/foo") is equivalent to @HxLocation(path="/foo").

      Default:
      ""
    • path

      String path
      The url path to make the redirect.
      Default:
      ""
    • source

      String source
      The source element of the request
      Default:
      ""
    • event

      String event
      An event that "triggered" the request
      Default:
      ""
    • handler

      String handler
      A callback that will handle the response HTML.
      Default:
      ""
    • target

      String target
      The target to swap the response into.
      Default:
      ""
    • swap

      String swap
      How the response will be swapped in relative to the target
      Default:
      ""