Laurie Harper wrote:
Kibo wrote:
Hi conference

Can I use "continue" in struts tag <s:iterator> ?
----------------------------------------------------------
from:

for (Category cat : category){ if (cat.getId() == 1)
                    continue;
System.out.println(cat.getName()); } -----------------------------------------------------------------------------
to:

<s:iterator value="category" status="rowstatus" > <s:if test="id == 1"> ????????????? </s:if> <li><s:property value="name"/></li> </s:iterator>
-------------------------------------------------

No, that's not supported. You'll need to filter the collection in advance.

... or invert the logic:


<s:iterator value="category" status="rowstatus"  >
    <s:if test="id != 1">
        <li><s:property value="name"/></li>
    </s:if>
</s:iterator>

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to