I think you should set the property of the form in an action, that will
forward to your JSP.
In this action, set the property corresponding to your check box at true:

MyForm myForm = (MyForm) form;
if (tablecolumn.value == 1) {
    myForm.setCheckboxProperty = true;
}

Then, the check box corresponding to CheckBoxProperty will be checked on the
JSP.

Hope it helps
    Patrice



----- Original Message -----
From: "Mouratidis, Georg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 5:44 PM
Subject: RE: set a html:checkbox checked


> The poblem is not to post back, the problem ist to populate the checkbox
checked.
>
> I would like to set the checked attribut dynamically.
>
> something like :
> if tablecolumn.value == 1 then checkbox = checked
>
> any idea
> thx georg M.
>
>
> Don't use the struts tag.  The struts checkbox tag assumes all
> checkboxes are off.  Use something like
>
> <input type='checkbox' name='yourbeanproperty' checked>
>
> As long as you use the name which corresponds to the form bean property
> struts will correctly link the data back to your form.  Hope this helps.
>
> Edgar
>
> -----Original Message-----
> From: Mouratidis, Georg [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 11:25 AM
> To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
> Subject: RE: set a html:checkbox checked
>
>
> Hi, Oliver
>
> did you get any response. i'm looking for the same.
> could you send me your solution please?
>
> thx
>
> Georg M.
>
> -----Original Message-----
> From: Oliver Kersten [mailto:[EMAIL PROTECTED]]
> Sent: Donnerstag, 21. November 2002 17:34
> To: [EMAIL PROTECTED]
> Subject: set a html:checkbox checked
>
>
> Hi,
>
> how can I set a checkbox checked during creation in the JSP. In HTML I
> would do it like this:
>
>   <input type="checkbox" name="mycheck" checked>
>
> But I can't find that for the struts tag:
>
>   <html:checkbox property="mycheck">check it</html:ckeckbox>
>
> And can I use the value "true" to set a checkbox checked. I get only a
> "true" from my bean and not a "checked" or something else.
>
> ciao Oliver.
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to