On Thu, 25 Jul 2002, Kamholz, Keith (corp-staff) USX wrote:
> Date: Thu, 25 Jul 2002 11:58:06 -0400
> From: "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: <html:checkbox>
>
> Well, I know that. But the issue isn't getting the checkboxes to correctly
> set the bean properties, it's correctly setting the box state on the form
> page. If the boolean property is true, and I click on the link to edit the
> bean, I don't want to have to recheck the box (if the property was
> previously set to 'true') in order to preserve that property while changing
> other properties. I hope I'm being clear, do you know what I mean? It
> seems like a very undesirable struts issue.
If you use Struts the way the documentation describes it, checkboxes
maintain their state correctly just like any other field. That means, in
a nutshell:
* Have a boolean property in your form bean with an appropriately
named getter and setter method.
* In your reset() method, set the boolean property to false.
See the "subscription.jsp" page, and the corresponding form bean, in the
struts-example.war application and you'll see that it really does work.
>
> ~ Keith
> http://www.buffalo.edu/~kkamholz
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>