You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kamholz, Keith (corp-staff) USX" <kk...@moog.com> on 2002/08/07 19:02:22 UTC
RE: Dynamic parameters in Struts links
I don't think I got a reply through this list, I fixed it on my own, but
either way it works. I was using the wrong attributes in the <html:link
...> tag.
Now my code is:
<logic:iterate id="mc" name="entries" property="mcEntries"
type="com.moog.us.eos.beans.MCentry" indexId="index1">
<html:link page="/EditMC.do?action=edit&type=mc" paramId="index"
paramName="index1">Edit</html:link>
It works fine. I hope it helps you out.
(By the way, my name's Keith, not Kevin!)
~ Keith
http://www.buffalo.edu/~kkamholz
-----Original Message-----
From: Alex McLintock [mailto:alex@OWAL.co.uk]
Sent: Wednesday, August 07, 2002 10:50 AM
To: kkamholz@moog.com
Cc: Jannah Patchay
Subject: Dynamic parameters in Struts links
Hi Kevin,
Did you get a response to this?
I have the same problem and can't find an answer in the docs, my book, or
on the mailing list archives....
I thought Struts was mature technology, but it seems to have rather a lot
of teething problems.
Alex McLintock
· From: Kamholz, Keith (corp-staff) USX
· Subject: Sending a Dynamic parameter
· Date: Mon, 15 Jul 2002 09:29:11 -0700
Hey everyone,
I have an issue that I could use a little help with. I have a link to edit
a stored entry. A <logic:iterate> tag displays the various entries. In the
body of the tag, I have that link which sends 2 static parameters 1 dynamic
parameter (the indexId). I have tried a few different combinations, none of
which work. Some give me errors/exceptions, and others just give me null
for my index value. The different combinations I have tried are:
----------------------------------------------------------------------------
---------------------
<logic:iterate id="mc" name="entries" property="mcEntries"
type="com.moog.us.eos.beans.MCentry" indexId="index1">
<tr>
<td>
<html:link page="/EditEntry.do?action=edit&type=mc"
paramName="index" paramProperty="index1">Edit</html:link>
</td>
----------------------------------------------------------------------------
---------------------
<logic:iterate id="md" name="entries" property="mdEntries"
type="com.moog.us.eos.beans.MDentry" indexId="index2">
<tr>
<td>
<bean:define id="temp2" value="<%=index2.toString()%>"/>
<html:link page="/EditEntry.do?action=edit&type=md"
paramName="index" paramProperty="temp2">Edit</html:link>
</td>
----------------------------------------------------------------------------
---------------------
<logic:iterate id="twcmc" name="entries" property="twcmcEntries"
type="com.moog.us.eos.beans.TWCMCentry" indexId="index3">
<tr>
<td>
<html:link page="/EditEntry.do?action=edit&type=twcmc"
paramName="index" paramProperty="<%=index3.toString()%>">Edit</html:link>
</td>
----------------------------------------------------------------------------
---------------------
<logic:iterate id="mc" name="entries" property="mcEntries"
type="com.moog.us.eos.beans.MCentry" indexId="index1">
<tr>
<td>
<html:link
page="/EditEntry.do?action=edit&type=mc&index=<%=index1.toString()%>">Edit</
html:link>
</td>
----------------------------------------------------------------------------
---------------------
None of these work. Does anybody know what I'm doing wrong? All I want to
do is store the indexId in a parameter called index. It should be very
straightforward, but I guess things are always harder than they seem.
Thanks in advance.
~ Keith
http://www.buffalo.edu/~kkamholz
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here
http://www.OWAL.co.uk/oss_support/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>