From the course: HTMX with Thymeleaf in Spring Boot
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Demonstrate hx-patch and hx-put with Spring Security - Spring Boot Tutorial
From the course: HTMX with Thymeleaf in Spring Boot
Demonstrate hx-patch and hx-put with Spring Security
- [Instructor] With 03-10_begin/records-management open in IntelliJ, let's turn now to discuss how to use HX Patch or HX Put. The process for working with HX Patch or HX Put is very much the same as using HX delete, and fortunately we already have a script in place to help us attaching the CSRF headers and tokens. Let's start the application in the terminal by running Maven spring-boot run. When it's complete, let's open the browser and log in. Go ahead and click the view person, locate the email addresses, and let's click the pencil icon for edit. The first thing you should see is that the form says add email, which does not make sense contextually. We're going to have to change that. Open the editable-email-form.html, located under resources, person, editable-email-form, as well as the PersonController.java. Let's locate the show edit email form. Around line 148, let's hit enter at the end of the line and add a model attribute. We'll type edit with a value of true. Both methods for…
Contents
-
-
-
-
-
(Locked)
Learn to use HTMX swapping5m 11s
-
(Locked)
Differentiate between inner and outerHTML swapping10m 51s
-
(Locked)
Decide when to use hx-swap: afterbegin and beforebegin8m 11s
-
(Locked)
Implement hx-on functionality to listen for hx-swap events9m 24s
-
(Locked)
hx-swap: beforeend, afterend, and deleting elements5m 11s
-
(Locked)
Implement hx-swap and use view transition API13m
-
(Locked)
Learn to use hx-swap scrolling modifiers7m 6s
-
(Locked)
Understand HTTP verbs with hypermedia6m 18s
-
(Locked)
Demonstrate hx-post and hx-delete with Spring Security11m 12s
-
(Locked)
Demonstrate hx-patch and hx-put with Spring Security9m 56s
-
(Locked)
-
-
-
-
-