struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Menke, John" <John.Me...@acs-inc.com>
Subject RE: html:link forward + hard coded parameter
Date Tue, 04 May 2004 14:07:59 GMT
<core:url var="myUrl" value="/action.do">
   <core:param name="myParam" value="paramValue"/>	
</core:url>

-----Original Message-----
From: Susan Bradeen [mailto:SusanB@softlanding.com]
Sent: Tuesday, May 04, 2004 8:59 AM
To: Struts Users Mailing List
Subject: Re: html:link forward + hard coded parameter


"Dean A. Hoover" <dhoover@rochester.rr.com> wrote on 05/04/2004 04:15:19 
AM:

> Maybe I need to restate this...
> 
> Ok, so I am generating a page of "entries"
> that are clickable by the user, in which case
> something about that entry will be displayed.
> Its the classic search engine results type of thing.
> Anyway, so let's say I have a forward defined
> something like "show" => "/ShowResult.do".
> The way ShowResult knows what to show is
> by looking at a parameter (e.g., x). If I were
> just going to generate HTML (and not use the
> forward) I would output:
> 
> <a href="/ShowResult.do?x=1">One</a>
> <a href="/ShowResult.do?x=2">Two</a>
> etc.
> 
> I am trying to figure out how to hang the "?x=n"
> query string onto the forward using the html:link
> tag. Is this even possible? All the parameter oriented
> attributes to this tag seem to rely on bean related stuff.
> That's not what this is about. As stated in the title
> the parameter is "hard coded" (in the HTML that is).
> Anyone know how to do it, or do I need to write my own
> version of the html:link tag?
> 

Dean,

Since you are hard coding, does this not work for you?

<html:link page="/ShowResult.do?x=1">One<html:link/>

OR I believe you can use the 'action' attribute instead of the 'page' 
attribute.

HTH,
Susan Bradeen

> Dean Hoover
> 
> Dean A. Hoover wrote:
> 
> > I want to use a forward I have defined
> > when the user clicks on one of several
> > on a page. A parameter indicates which
> > one the user clicked on. In html, it might
> > look like this:
> >
> > <a href="http://abc.com?x=1">One</a>
> > <a href="http://abc.com?x=2">Two</a>
> > <a href="http://abc.com?x=3">Three</a>
> >
> > How would I do this using the html:link tag.
> >
> > Dean Hoover
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message