You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Dawn <pe...@gmail.com> on 2006/09/15 00:17:16 UTC

Checkbox component

guys,

am using the checkbox component within my form. now i have a number of
checkboxes, hence i have an option to select all or none of the
checkboxes. the user clicks on the link and depending upon the link
either all or none of the checkboxes get ticked off.

now obviously for me to reference these checkboxes, i need to name
them. so i have something like this,
<input type="checkbox" jwcid="@Checkbox" selected="ognl:test1Select"
name="test1Select" value="testPage"/>

and within my js i have.
document.getElementById['test1Select'].checked=true;

but its not working. and when i look at the source code, the name of
the checkbox is $Checkbox0 (tapestry is generating these names based
on the checkbox component).

so my issue is, how can i reference these individual checkboxes with
names. any help pls.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Checkbox component

Posted by D&J Gredler <dj...@gmail.com>.
jwcid="test1Select@Checkbox"

Tapestry will automatically assign it "test1Select" as the id in the HTML, I
believe.

On 9/15/06, Peter Dawn <pe...@gmail.com> wrote:
>
> guys,
>
> am using the checkbox component within my form. now i have a number of
> checkboxes, hence i have an option to select all or none of the
> checkboxes. the user clicks on the link and depending upon the link
> either all or none of the checkboxes get ticked off.
>
> now obviously for me to reference these checkboxes, i need to name
> them. so i have something like this,
> <input type="checkbox" jwcid="@Checkbox" selected="ognl:test1Select"
> name="test1Select" value="testPage"/>
>
> and within my js i have.
> document.getElementById['test1Select'].checked=true;
>
> but its not working. and when i look at the source code, the name of
> the checkbox is $Checkbox0 (tapestry is generating these names based
> on the checkbox component).
>
> so my issue is, how can i reference these individual checkboxes with
> names. any help pls.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>