##### Confirmation Required

Are you sure you want to proceed?

##### Form

Loading...

Loading form...

##### Confirm Deletion

Warning: This action cannot be undone.

Are you sure you want to delete this item?

Sizes: sm, default (omit), lg, xl ============================================ -->

##### Modal Title

##### Notification

// Example 3: Handle form submission with validation errors @PostMapping("/items") @HxRequest public String createItem(@Valid @ModelAttribute Item item, BindingResult result, Model model) { if (result.hasErrors()) { // Return form fragment with errors - modal stays open return "fragments/item-form :: form"; } itemRepository.save(item); // Return updated list - modal will close automatically model.addAttribute("items", itemRepository.findAll()); return "fragments/item-list :: list"; } // Example 4: Return success message in modal @DeleteMapping("/items/{id}") @HxRequest public String deleteItem(@PathVariable Long id, Model model) { itemRepository.deleteById(id); // Trigger success modal via HX-Trigger response header model.addAttribute("items", itemRepository.findAll()); return "fragments/item-list :: list"; } -->