Replies: 1 comment
-
No, this is not on the road map, since jte is a template engine and knows nothing about the web framework it is used with. However, even if we would implement this for e.g. Spring Boot, I think there is no need for a new keyword. If you generate those functions from the annotations (or write them by hand), you can simply call the Java code from the template. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I am using JTE in combination with HTMX. That means my controllers are very coupled to by templates for the GET and POST request.
Currently I just use hardcoded string as
hx-get
values e.g.<button hx-put ="/cart/add/1234">Add</button>
Sure I could create a static function to create the URL. But it would be very nice to have that build in like this:
<button hx-put ="@routes.CartController.addItem(1234)">Add</button>
It would need to find all
*Mapping()
Annotations,@PathVariable
or@RequestParam
etc and create functions for that.Is this on the road map?
Beta Was this translation helpful? Give feedback.
All reactions