Developer
Developer

Reputation: 55

I can not update or delete property. Get and Post methods work fine. I'm using spring boot and thymeleaf

I see there are many questions for this question but nothing is helping. I can't find the solution. I can't set up the button links correctly.

Controller:

    @RequestMapping(value="/deleteProperty/{idProperty}", method = RequestMethod.DELETE)
    public String deleteProperty1(@PathVariable("idProperty") int idProperty) {
        propertyService.deleteById(idProperty);
        return "redirect:/admin/properties/allProperties";
    }

Update button:

@{/admin/properties/deleteProperty(idProperty=${tempProperty.idProperty})}"

Delete button:

@{/admin/properties/deleteProperty/{idProperty}'(idProperty=${tempProperty.idProperty})}"

Upvotes: 0

Views: 113

Answers (0)

Related Questions