It's not a secret anymore!*
The moose likes Struts and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "jsp" Watch "jsp" New topic
Author

jsp

NazneenAliza Shaikh
Greenhorn

Joined: Jan 17, 2008
Posts: 10
How can i check <html:checkbox> in struts using DynaValidatorForm when field(checkbox) is having datatype String[] on Edit link of the Record...as it's working fine on my Add button
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61652
    
  67

Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

A subject of "jsp" in a forum dedicated to JSP is worse than useless.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you have a series of checkboxes all with the same property and that property is of type String[], you should be using html:multibox instead of html:checkbox. To set the checkbox as checked initially, just set the property of the bean. Example:

The following statement in an action that forwards to this JSP would cause the red checkbox to show as checked:

[ January 20, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
jQuery in Action, 2nd edition
 
subject: jsp