On 5/26/06, Jean-Marie Pitre <[EMAIL PROTECTED]> wrote:

Thank's for your reply Miguel.

It is not exactly what I want ... :(

<snip/>

While it requires the JSP author to have an additional "index"
attribute on your custom tag, it does introduce a loose coupling that
allows the author to watch for the index of, say, the third
logic:iterate tag or the second c:forEach tag along the ancestor axis,
as compared to the getIndexValue() solution.

-Rahul


In fact I have write a custom JSP tag, I use it in an iterate block.
I would like to retrieve in the doStartTag block the Index value.

Jean-Marie

-----Message d'origine-----
De: Miguel Galves [mailto:[EMAIL PROTECTED]
Envoyé: vendredi 26 mai 2006 13:52
Ŕ: Struts Users Mailing List
Objet: Re: getIndexValue() in custom tag

Jean Marie,

I'm not sure if that's what you are looking for...

<logic:iterate name="harvestForm" property="glebas" id="g" indexId="index">
           <tr>
               <td><b><bean:write name="g" property="name"/></b></td>
               <logic:iterate name="harvestForm" property="costs[${index}]"
id="c">
               <td align="right"><%= costFormat.format(c) %></td>
               </logic:iterate>
           </tr>
           </logic:iterate>

In the code above, I use index to access values in an array called costs.

[]s

On 5/26/06, Jean-Marie Pitre <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> I am developing an application with struts and custom JSP tags.
>
> In my custom tag I would like to retrieve the getIndexValue() when I use
> it inside an iterate (in order to change its name like xxx[1] ...).
>
> Have you got any idea?
>
<snap/>

Reply via email to