Well technically it's not a "getter" since it takes a parameter but
that doesn't matter you can call any method on your action just using
the full name and calling it like in java.

<s:iterator value="getProducts(#index)" var="product" status="stat">

Now I'm not sure what you are trying to do with the #index syntax
since getProducts() will be called once and should return a Collection
or Array, it is not called on each loop of the iterator.

You may need a different form of the iterator tag.
http://struts.apache.org/2.1.8.1/docs/iterator.html



On Fri, Jun 25, 2010 at 4:25 AM, Alex Rodriguez Lopez
<alo...@flordeutopia.pt> wrote:
> You can do this without parameters. Write a setter for this index property
> (to save it), and then in the getter you grab the saved value.
>
>> Hi,
>>
>> I want to call s:iterator and fetch a list by passing it an index. This
>> list will be dynamically generated.
>>
>> <s:iterator value="products[#index]" var="product" status="stat">
>>
>> where I want getProducts(Integer index) to be called.
>>
>> Is this possible?
>>
>> Thanks
>>
>> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to