You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rob <ro...@fastmail.fm> on 2002/02/06 17:41:06 UTC
nesting struts tags
What is the appropriate way to nest tags in struts? I've seen this posted
before but couldn't find a scriptlet free answer so I'm posting myself.
I have a collection through which I'm iterating with the logic:iterate tag
each item in the collection is meant to be used to create a link to view the
item.
If someone could tell me how to do the following properly.
<logic:iterate id="mybean" name="mybeanarray">
<html:link forward="myForward?id="<jsp:getProperty name="mybean"
property="id"/>"/>
<br>
</logic:iterate>
Also, I would like to try and avoid scriptlets in the page but if avoiding
them all together is not possible a solution with scriptlets is alright.
Thanks
rob
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: nesting struts tags
Posted by Pavel Nejedly <bi...@atrey.karlin.mff.cuni.cz>.
On Thu, Feb 07, 2002 at 03:41:06AM +1100, rob wrote:
# What is the appropriate way to nest tags in struts? I've seen this posted
# before but couldn't find a scriptlet free answer so I'm posting myself.
#
# I have a collection through which I'm iterating with the logic:iterate tag
# each item in the collection is meant to be used to create a link to view the
# item.
#
# If someone could tell me how to do the following properly.
#
# <logic:iterate id="mybean" name="mybeanarray">
# <html:link forward="myForward?id="<jsp:getProperty name="mybean"
# property="id"/>"/>
# <br>
# </logic:iterate>
Try
<logic:iterate id="mybean" name="mybeanarray">
<html:link forward="myForward"
paramName="mybean" paramProperty="id" paramId="id">
...
</html:link>
</logic:iterate>
Pavel
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>