It's not a secret anymore!
The moose likes Struts and the fly likes  struts html:checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark " struts html:checkbox" Watch " struts html:checkbox" New topic

struts html:checkbox

shawn kennedy
Ranch Hand

Joined: Oct 31, 2002
Posts: 67
Hi guys,
Does anyone know how to get a <html:checkbox> checked if the value is fetched from the database is true and it should be unchecked if the value is true.I have a checkbox called training the value is true
I tried using the formbean.setTraining() to set the value got from the database but it does not seem to check the checkbox whatsoever.
Please help.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32815

You have the right idea. Can you post a piece of the JSP that contains the checkbox?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Michael Enzo

Joined: Sep 13, 2004
Posts: 4

I use a vector to prepopulate, and the formbean to snag checkbox values and update the vector.

Fear the Qubit
I agree. Here's the link:
subject: struts html:checkbox
It's not a secret anymore!