-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary servlet response manipulations #5
Conversation
I don't see why this is a very big problem (related to uglyness) for the BE to drive the URL for these pagination steps. With the changes you propose, the URL are no more bookmarkable when changing page, the URL doesn't get updated anymore and stays on We would need to fix that, also I think on |
You don't think servlet API references in controllers is ugly? I suppose it's not for me to say. Anyway, I see what you mean about the URL query params being bookmarkable - I don't recall ever seeing them, but I was probably not looking hard enough. The vets link has no query params so I might hack the PR around until it is the smallest it can be without changing bookmarks. |
I updated the |
fce19de
to
9a4ee11
Compare
@@ -122,9 +122,13 @@ <h2>Pets and Visits</h2> | |||
</tr> | |||
<tr> | |||
<td><a th:href="@{__${owner.id}__/pets/__${pet.id}__/edit}" | |||
th:attr="hx-get=@{__${owner.id}__/pets/__${pet.id}__/edit}" hx-target="#block-content">Edit Pet</a></td> | |||
hx:get="@{__${owner.id}__/pets/__${pet.id}__/edit}" | |||
hx:push-url="@{__${owner.id}__/pets/__${pet.id}__/edit}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could replace this with hx-push-url="true"
and it should work just the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I also replaced all the unnecessary HttpServletRequest
and HttpServletResponse
method parameters. I wonder if we even need the HtmxResponse
(controller methods can return strings if there is only one view to render), but I didn't go that far.
No description provided.