I'm not sure I understand your recent email. But given your original example
(non working):
<html:link
page="/ServiceReport.do?operation=delete&operationActivityId=<bean:getProperty
name="activity" property="id"/>"/>
You can do:
<html:link page="/ServiceReport.do?operation=delete"
paramId="operationActivityId" paramName="activity" paramProperty="id"/>
Will
----- Original Message -----
From: "chiji nwankwo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 7:24 AM
Subject: Re: link with dynamic page attribute
Hi,
Im in a bit of dilema, I understand Ted's last statement. But what I don't
understand is what I should do if the parameters which are used by the
html:link (forward) tag are generated on the fly. I can't hard code all the
forwards in my config file because I don't know how may parameters there
will be in advance. Since I don't know the amount parameters in advance I
can't specify which form bean each of the actions with, appended parameter
values, should use.
This is what my problem looks like:
in config file:
<forward name="search" path="/do/search" />
<action path="/search"
name="searchForm"
input="/seach.jsp"
scope="request" />
in jsp file:
<logic:iterate id="pageNumber" name="pageList" offset="0">
<html:link forward="search" paramName="pageNumber" paramId="pageNumber>
<bean:write name="pageNumber" />
</html:link>
</logic:iterate>
<html:hidden property="pageNumber" />
when I use:
<html:link forward="search" >
it works fine and think this is because of the mapping in the config file.
I would want the forward to 'search' (/do/search) as well as the forward to
'search' and it parameters (/do/search?pageNumber=1) to use the same form
bean.
I hope this makes sense.
I am in dire need of assistance.
Thanks
Chiji
>
>Nesting custom tags that way is not allowed by the specification.
>
>The html:link tag has special properties for assembling hyperlinks from
>other beans. It can also accept a map when multiple parameters are
>needed.
>
>http://jakarta.apache.org/struts/struts-html.html#link
>
>Personally, I avoid using the page= property, and like to use only
>forward= instead. That way everything is documented in the configuration
>file.
>
>-- Ted Husted, Husted dot Com, Fairport NY USA.
>-- Custom Software ~ Technical Services.
>-- Tel +1 716 737-3463
>-- http://www.husted.com/about/struts/
>
>
>
>Antonio Lourinho wrote:
> >
> > Hi,
> >
> > i'm new to Struts and i'm already working on a project that takes
>advantage
> > of it.
> >
> > The problem is: i'm trying to put a link, and the page attribute depends
> > upon the value of a bean defined by an iterate tag.
> >
> > something like:
> >
> > <html:link
> >
>page="/ServiceReport.do?operation=delete&operationActivityId=<bean:getProper
> > ty name="activity" property="id"/>"/>
> >
> > the error is:
> >
> > org.apache.jasper.compiler.ParseException:
> > C:\Dev\Projectos\ControloHoras\web_app\ServiceReport.jsp(171,115)
>Attribute
> > activity has no value
> >
> > Does anybody have a clue?
> >
> > Antonio - Portugal
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp