This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes MVC - But an older version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "MVC - But an older version" Watch "MVC - But an older version" New topic

MVC - But an older version

K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
I have an app that I am debugging that uses a jsp, value object(VO), and a binder.

In the jsp, I have a boolean(checkbox), that I need to store in the VO and I have a getter and setter method:

For some reason, they aren't grabbing the value of the boolean and always maintain "false". Am I missing anything?
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

This code looks fine to me, so the problem must be elsewhere. Where's the code that takes the values from the form and sets them in the VO? Is that set correctly?

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
This is the jsp code:

The intial value in the VO is set to false. I have print statements everywhere and no matter if the box is checked or not, it always displays "false" through to the binder.
I agree. Here's the link:
subject: MVC - But an older version
It's not a secret anymore!