You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gary Bartlett <ga...@yahoo.com> on 2002/05/15 21:59:46 UTC
equal tag within iterate have access to current item
Greetings -
I have a page where I wish to place a logic:equal tag
within an iterate tag. I would like the method (in
the FormBean) associated with the logic:equal tag to
have the context of the current item to use as part of
its logic.
Is there any way to do this ? For example, can the
iterate tag call a setter in the FormBean to set the
current item in the list ?
Thanks,
Gary Bartlett
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: equal tag within iterate have access to current item
Posted by Rajesh Kalluri <rk...@manduca.com>.
Garry,
yes you can apply equal tag to current element in ur collection inside a
logic:iterate as follows.
<logic:iterate id="caja" name="cajas" type="com.xxxx.yyyy.cajas.Caja"
scope="session" >
<logic:equal name="caja" property="linkLess" value="false">
<a href="<bean:write name="caja" property="url"/>" target="preview">
</logic:equal>
<span class="titular_cajas_sup">
<bean:write name="caja" property="title" filter="false"/></a></span><br>
<span class="conte_cajas">
<bean:write name="caja" property="summary" filter="false"/>
</logic:iterate>
id="caja" gives u handle to current item inside a logic iterate (name=caja)
and just like you do your bean:writes you can use logic:equal/match based on
the data types you are trying to apply your logic on.
Regards
Rajesh
-----Original Message-----
From: Gary Bartlett [mailto:gary_a_bartlett@yahoo.com]
Sent: Wednesday, May 15, 2002 4:00 PM
To: StrutsUser Maillist
Subject: equal tag within iterate have access to current item
Greetings -
I have a page where I wish to place a logic:equal tag
within an iterate tag. I would like the method (in
the FormBean) associated with the logic:equal tag to
have the context of the current item to use as part of
its logic.
Is there any way to do this ? For example, can the
iterate tag call a setter in the FormBean to set the
current item in the list ?
Thanks,
Gary Bartlett
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>