• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts html:checkbox

 
shawn kennedy
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 34396
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shawn,
You have the right idea. Can you post a piece of the JSP that contains the checkbox?
 
Michael Enzo
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/49176/Struts/Struts-Iterate-Index-Checkboxes

I use a vector to prepopulate, and the formbean to snag checkbox values and update the vector.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic