tags:

views:

441

answers:

0

Hi, everyone! :)

I am trying to pass an OGNL expression from Tiles framework (2.0.4) to the value attribute of <s:iterator> tag like this:

tiles.xml

<definition name="test" template="/test.jsp">
    <put-attribute name="collectionName" value="apples"/>
</definition>

test.jsp

<tiles:importAttribute toName="collectionName" name="collectionName" ignore="true"/>
<s:iterator value="{#attr['collectionName']}">
    <s:property value="type"/>
</s:iterator>

In my action class there is a property apples of type List<Apple>, which Apple (JavaBean) has a type property.

But the iterator tag doesn't loop anything. Is it possible to pass that way an OGNL expression to a <s:iterator> tag? Thanks!