permaculture playing cards
The moose likes Spring and the fly likes Edit Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Edit Data" Watch "Edit Data" New topic

Edit Data

Arian Zand

Joined: May 28, 2012
Posts: 9

As some already know I creating Crud app
I already have Read,Delete and create but I get an error while updating data

When I click on a reservation(for a hotel) I get the values from my reservation, in my form i can edit the value and I like to update it to the DB

My controller for my edit

In my Dao I only have one parameter the reservation ID (Is this right?)

In my DaoImpl I update my data
, I dont know which function to use to update data , I used refresh... / Also tried Merge

If i click on update i get this error:
SEVERE: Servlet.service() for servlet appServlet threw exception
java.lang.IllegalStateException: Handler parameter annotations are exclusive choices - do not specify more than one such annotation on the same parameter: public java.lang.String eu.test.test4.controller.ReservationController.reservationEditUpdate(java.lang.Integer,eu.test.test4.model.Reservation,org.springframework.validation.BindingResult,org.springframework.ui.ModelMap)


I dont know why but I have "0" as reservationId in my Post Method controller
Is there something wrong with my modelattribute ?
Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

What version of Spring are you using? If you are using 3.1 the fix is a bit more flexible. See below link.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: Edit Data
jQuery in Action, 3rd edition