You can try <t:if test='checked'> <input type='checkbox' name='leaf' id='leaf' value='leaf' checked='checked'/>
<p:else> <input type='checkbox' name='leaf' id='leaf' value='leaf'/> </p:else> </t:if> regards Taha On 12-Jul-2013, at 7:37 AM, newbie newbie <codehel...@gmail.com> wrote: > Hi. > I am using the HTML checkbox with a Tree. When I use the Checkbox > component(tapestry) with Tree, it gives me error and I don't know how to > solve it. So I try with HTML checkbox. Do you have any idea on how to use > Checkbox component(tapestry) with Tree? > > > On Fri, Jul 12, 2013 at 9:46 AM, Thiago H de Paula Figueiredo < > thiag...@gmail.com> wrote: > >> Hi! >> >> Yeah, I think my suggestion wasn't correct. I apologize. >> >> One question: why don't you want to use the Checkbox component and use a >> regular HTML one instead? >> >> >> On Thu, 11 Jul 2013 22:04:23 -0300, newbie newbie <codehel...@gmail.com> >> wrote: >> >> Hi, >>> The solution below is not working >>> <input type="checkbox" name="leaf" id="leaf" value="leaf" >>> checked="${checked}"/> >>> >>> public String getChecked() { >>> if (shouldBeChecked()) { >>> return "checked"; >>> } >>> else { >>> return ""; >>> The checkbox is always checked. I think once you write the "checked" >>> attribute, the checkbox will be checked. I need to checked some checkbox >>> but leave the rest unchecked. >>> >>> >>> On Thu, Jul 11, 2013 at 10:06 PM, Thiago H de Paula Figueiredo < >>> thiag...@gmail.com> wrote: >>> >>> On Thu, 11 Jul 2013 05:12:53 -0300, newbie newbie <codehel...@gmail.com> >>>> wrote: >>>> >>>> Hi, >>>> >>>>> I am using plain HTML checkbox(not Tapestry type). I need to set the >>>>> checkbox to checked in my java page. How do I do that? >>>>> >>>>> Here is my tml code fragment >>>>> >>>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"/> >>>>> >>>>> >>>> <input type="checkbox" name="leaf" id="leaf" value="leaf" >>>> checked="${checked}"/> >>>> >>>> public String getChecked() { >>>> if (shouldBeChecked()) { >>>> return "checked"; >>>> } >>>> else { >>>> return ""; >>>> >>>> } >>>> } >>>> >>>> >>>> >>>>> Any help would be appreciated. Thanks. >>>>> >>>>> >>>> >>>> -- >>>> Thiago H. de Paula Figueiredo >>>> >>>> ------------------------------****----------------------------** >>>> --**--------- >>>> To unsubscribe, e-mail: >>>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org> >>>> <users-unsubscribe@**tapestry.apache.org<users-unsubscr...@tapestry.apache.org> >>>>> >>>> >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>>> >> >> -- >> Thiago H. de Paula Figueiredo >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org