tapestry-user@jakarta.apache.org
[Top] [All Lists]

Re: Getting an id in a Foreach

Subject: Re: Getting an id in a Foreach
From: Paul Ferraro
Date: Tue, 19 Oct 2004 14:02:10 -0700
Try using the index property of the Foreach component:

<tr jwcid="@Foreach" index="ognl:index" ... element="tr">
   <td jwcid="@Any" id="ognl:'myid' + index">...</td>
</tr>

Paul

Hensley, Richard wrote:

I'm trying to get the html id attribute set on a table cell. I would like
that id to be based on something generated by Tapestry. I've tried the
following because I though that the jwcid would output an id on the table
cell.

<tr jwcid="@Foreach" ...>
<td jwcid="myid@Any" element="td">

</td>
</tr>

I thought that the td would all have id's like myid, myid$0, myid$1, etc...
However, as the experts already know, this is not so.
Does anybody have any suggestions about how to accomplish this?

The goal is to be able to find table cells in the HTML returned by the
Tapestry application to httpunit.

Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: tapestry-user-help@xxxxxxxxxxxxxxxxxx



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: tapestry-user-help@xxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>