Annotation 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 ElementsModifier and TypeOptional ElementDescriptionbooleanIf the path should be interpreted as context relative if it starts with a slash ("/").An event that "triggered" the requestA callback that will handle the response HTML.The url path to make the redirect.A CSS selector to select the content you want swapped from a response.The source element of the requestHow the response will be swapped in relative to the targetThe target to swap the response into.The url path to make the redirect.
-
Element Details
-
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 pathThe url path to make the redirect.- Default:
- ""
-
source
String sourceThe source element of the request- Default:
- ""
-
event
String eventAn event that "triggered" the request- Default:
- ""
-
handler
String handlerA callback that will handle the response HTML.- Default:
- ""
-
target
String targetThe target to swap the response into.- Default:
- ""
-
swap
String swapHow the response will be swapped in relative to the target- Default:
- ""
-
select
String selectA CSS selector to select the content you want swapped from a response.- Default:
- ""
-
contextRelative
boolean contextRelativeIf the path should be interpreted as context relative if it starts with a slash ("/").- Default:
- true
-