Thanks for your assistance, I think I almost got it but I think I may need a little more clarification.
I think my issue now may be the way that I am using the checkboxes..perhaps my logic is not correct.
So right now I have my form
Here are my objects
My viewController is working fine and takes me to my
jsp form but the processing of my form is failing. Once I click on submit I get this error:
org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred while calling setter of com.domain.Person.programs; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.domain.Person.programs
Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.domain.Person.programs
Caused by: java.lang.IllegalArgumentException: argument type mismatch
My idea is to populate program.status with a "Yes" when checked. By default, the value of program.status is "No". But it just doesn't make sense to me how that value "Yes/No" is passed through <form:checkboxes>. I have been reading different examples but I can't seem to get it right.
Here is my submitController that is processing the results which I'm sure is incorrect:
My table data looks like this
Person Table
id: 1234
username:jdoe
email:jdoe@gmail.com
loginDate: 2013-06-20
Program Table
id: 1
name:Swim
code:SWM
status:NO
endDate:2013-05-31
pid: 1234
id: 2
name:Tennis
code:TEN
status:NO
endDate:2013-05-31
pid: 1234
Any advice as to how the processing should work in my case?
Thanks