javastrutscommon-controls

using struts property in another struts tag


I am using Struts1; I am iterating through a list using logic:iterate

<logic:iterate .... indexId="index">

and i would like to use the "index" property as an argument to be passed to a javascript function while pressing a button

<ctrl:button ... onclick="return functioncall (index)"/>    

how is the sitax to access the correct "index" property inside the ctrl:button tag?

Thank you


Solution

  • I answer to myself:

    I can access the "index" struts variable using the jsp-expression language. The syntax is

    To make it work, I have to set <%@ page isELIgnored ="false" %>