Thanks, I appreciate the quick response.
Unfortunately, I'm not sure that this addresses my
issue, unless I've misunderstood something. It
doesn't really mention how to populate a checkbox with
a value... but it does provide the following:
<logic:iterate id="customer" name="customers">
<html:multibox property="control">
<bean:write name="customer" property="id"/>
</html:multibox>
<bean:write name="customer" property="fullName"/>
<br>
</logic:iterate>
This creates a checkbox for each customer in a
collection of customers. It supposedly creates the
following html:
<input type="checkbox" name="control" value="001"
checked="checked">
John Doe
<br>
<input type="checkbox" name="control" value="002">
Peter Smith
<br>
What I don't understand is how it determines that John
Doe should have his checkbox checked, but not Peter
Smith.
Do you have any ideas?
Thanks,
Anthony Frasso
--- Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> On 8/28/06, Anthony N. Frasso <[EMAIL PROTECTED]>
> wrote:
> > Hello all, and thanks for your help in advance.
> >
> > I have a relatively simple JSP that I'm trying to
> > present. I have a bean that is accessible as an
> > attribute in the request, as well as a form bean
> for
> > the form on this page. As an example, here is one
> of
> > the input components for the form:
> >
> > <html:text property="name" value="${bean.name}" />
> >
> > This takes the value of the "name" property in the
> > bean and initializes the text box with this value.
> > When the form is submitted, it takes the value
> from
> > the text box and places it into the "name"
> property of
> > the form bean.
> >
> > I'd like to do something similar with a checkbox.
> > However, I don't see any way to initialize the
> > checkbox. The value property works in a different
> way
> > than in most of the other form input tags. How
> would
> > I go about accomplishing this?
> >
> > Thanks again,
> > Anthony Frasso
>
> The first entry that comes up in Google when
> searching for "struts
> <html:checkbox>":
>
http://javaboutique.internet.com/tutorials/strutsform/
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]