Actually, that's what I have been doing with no problems. Have you tried it?

<html:link action="setLocale?lang=de">lang</html:link>

should work just fine in 1.2.4+

Regards,
Abdullah

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper
Sent: Monday, June 27, 2005 5:29 PM
To: user@struts.apache.org
Subject: Re: String as Parameterwith html:link


http://struts.apache.org/userGuide/struts-html.html#link

You can use paramId, paramName and paramPropery to supply a single parameter 
w/out building a map, though that still requires the parameter value to be 
stored in a bean in some scope. There's no way to supply arbitrary values 
directly (i.e. not from a bean or map) unfortunately.

L.

Franz-Josef Herpers wrote:

> Hi,
> 
> I have a question concerning the Struts-HTML-Tag <html:link>. I want to 
> generate a link to an action with one parameter which is a hardcoded 
> String (not a value of a bean property which is present in a scope). And 
> I don't want to use the url-Attribut but the action-Attribut to generate 
> the link to the action. One example link could be: 
> http://mydomain/setLocale.do?lang="de";.
> 
> What I'm doing now is: create a HashMap with one entry and use the 
> name-Attribut:
> 
> <jsp:useBean id="langParamMap" class="java.util.HashMap"/>
> <c:set target="${langParamMap}" property="lang" value="de"/>
> <html-el:link action="setLocale" name="langParamMap">
>   lang
> </html:el>
> 
> That works fine, but just out of curiosity: Is there really no 
> possibility to just provide a string via an attribute of html:link which 
> then is appended literally to the generated URL as a parameter. And if 
> not is there a special reason for it?
> 
> Regards
> Franz


-- 
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/~laurie/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to