Hi
t:id is not javascript id, although it is at times the same but it can
be different especially if there is a zone update or the component is
in a loop.
To set the javascript id use the parameter clientId.
Also you can't use property expressions in parameters. What you have
to do is use the prop binding prefix and add a property to the java
file.
e.g.
<t:loop source='somevalues' value='somevalue' index='index'>
<input type='radio' id='whatever' t:clientId='prop:sequenceId'/>
</t:loop>
and in java file
@Property
private int index;
public String getSequenceId(){
return "my_radio_" + index;
}
regards
Taha
On Thu, Jul 21, 2011 at 3:25 PM, ashu.soman <[email protected]> wrote:
> Hi,
>
> I need to use javascript in a loop which uses t:id of an element(a radio
> button). The javascript in an onclick event on another element(an image).
> But since tapestry is not allowing me to put t:id in t:id="${}" this
> fashion, i'm facing problem.
>
> Basically what i want to do is check corresponding radio button when clicked
> on an image. But since i need to use t:loop, i'm not able to access proper
> id through javascript for that.
>
> Please suggest how can i do it or is there any better way to do it?
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/t-loop-and-javascript-tp4618787p4618787.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]