You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leticia Golubov <lg...@micromuse.com> on 2004/02/27 16:50:07 UTC

html:link action - how to append query string

I have a simple question, for a change... :)

Given

<% String value="some Value" %>

and

<html:link action='/scopeAction?row=???'>

how do I append the java var 'value' to the end of the action?

If I hardcode it, it works and the behaviour is as expected, i.e.:

<html:link action='/scopeAction?row=3'>

Note I have tried the following and failed:
<html:link action='/scopeAction?row=<=value>'
<html:link action='/scopeAction?row="<=value>"'
<html:link action="/scopeAction?row='<=value>'"

Also searched on internet but didn't find anything as yet...

regards

NOTE: I don't want to use <html:hidden property="row" value="<%=value>"/> in
this instance...


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


RE: html:link action - how to append query string

Posted by Tomeu Vizoso <to...@zan.co.pt>.
I would recommend using the html-el tag library, in which case the code
should look like that:

<html:link action='/scopeAction?row={$value}'>

See here for an explanation on how to utilize the EL (expression
language):

http://javaboutique.internet.com/tutorials/Struts_EL/


Regards,

Tomeu

-----Mensagem original-----
De: Leticia Golubov [mailto:lgolubov@micromuse.com] 
Enviada: sexta-feira, 27 de Fevereiro de 2004 15:50
Para: Struts User Mailing List
Assunto: html:link action - how to append query string


I have a simple question, for a change... :)

Given

<% String value="some Value" %>

and

<html:link action='/scopeAction?row=???'>

how do I append the java var 'value' to the end of the action?

If I hardcode it, it works and the behaviour is as expected, i.e.:

<html:link action='/scopeAction?row=3'>

Note I have tried the following and failed:
<html:link action='/scopeAction?row=<=value>'
<html:link action='/scopeAction?row="<=value>"'
<html:link action="/scopeAction?row='<=value>'"

Also searched on internet but didn't find anything as yet...

regards

NOTE: I don't want to use <html:hidden property="row"
value="<%=value>"/> in this instance...


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


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