struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Fesler" <eric.fes...@hubmethods.com>
Subject RE: Multiple request parameter for the html:link tag
Date Wed, 04 Jul 2001 14:50:36 GMT
Hi Frederic,

Since then, I brought some enhancement to those tags.

Now the link tag support exactly the same attributes as the standard Struts
link tag.
The linkparam tag support the standard Struts approach:

id = the parameter name as it will be used in the request

name = The name of a JSP bean that is a String containing the value for the
request parameter named by id (if property is not specified), or a JSP bean
whose property getter is called to return a String (if pproperty is
specified). The JSP bean is constrained to the bean scope specified by the
scope property, if it is specified. (standard struts definition)

property = The name of a property of the bean specified by the name
attribute, whose return value must be a String containing the value of the
request parameter (named by the id attribute) that will be dynamically added
to this hyperlink.

scope = The scope within which to search for the bean specified by the name
attribute. If not specified, all scopes are searched.

value = the value of the request parameter

There is in fact 3 ways to specify the parameter value
1) the body of the linkparam tag
2) Use of name and property
3) specify the value as tag attribute

The precedence is 1, 2, 3.

I've attached the sources and the tld file (they are not clean up, they
still refer to the package com.hm.util.taglib and make reference to
org.apache.log4j package) so if you (or somebody else) think it would be
interesting to include it in the struts framework, I would be very happy.


Eric


> -----Message d'origine-----
> De : Fred [mailto:fredericba@in-fusio.com]
> Envoyé : mercredi 4 juillet 2001 14:31
> À : Eric Fesler
> Objet : Re: Multiple request parameter for the html:link tag
>
>
>
> 	Hi Eric,
>
> 	This this a very good news for me as I have exactly the
> same problem. I
> thank you for your work and i would be pleased to help you
> inserting this new
> tag in the struts framework if you decide to.
>
> 	Frederic.
>
>
>
> Le Vendredi  8 Juin 2001 14:50, vous avez écrit :
> > In a recent project, we had to face quite often the fact that
> we wanted to
> > use a <html:link> tag with multiple request parameters. I know that this
> > tag allows the use of a Map with all the parameters. However,
> we found its
> > usage quite difficult specially when the <html:link<> tag was
> embedded in a
> > <logic:iterate> tag and when the request parameters were dynamic.
> >
> > So I write an extension to the <html:link> tag so that we can
> add parameter
> > tags in its body. Actually, I have rewrite the <html:link> tag
> because the
> > new tag had to extend BodyTagSupport and not TagSupport.
> >
> > I have hereby attached both tags (the link tag and the linkparam tag) if
> > somebody is interested. I let you decide to put them in the
> standard Struts
> > core functionality (I would be very happy :-))) ).
> >
> > The link tag works exactly the same as the standard struts tag. The
> > linkparam tag does not include the Struts philosophy (I mean
> being able to
> > refer directly to a bean and its properties for the value) but the
> > attributes could be computed at runtime.
> >
> > Here is an example (too simple to be representative) of use:
> >
> > <hm:link href="request.do">
> >     <hm:paramlink name="action" value="read" />
> >     <hm:paramlink name="docref" value="55363" />
> >     This is the link for the request.
> > </hm:link>
> >
> >
> >
> > Eric
>
>

Mime
View raw message