You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chen, Gin" <Gi...@NielsenMedia.com> on 2003/06/04 18:03:58 UTC
RE: how to put a in a href=""
2 possibilities without using scriplets:
1) Struts-EL:
<html-el:link href="/getorg.do?id=${orglist.id}"/>
2) JSTL:
<c:url value="/getorg.do">
<c:param name="id" value="${orglist.id}"/>
</c:url>
-Tim
-----Original Message-----
From: António Santos [mailto:ansantos@fe.up.pt]
Sent: Wednesday, June 04, 2003 12:54 PM
To: struts-user@jakarta.apache.org
Subject: how to put a <bean:write> in a href=""
Hi all,
Maybe this is a simple question, but I'm stuck with this:
How can I set a href in a <html:link> tag with a string concatenated with a
<bean:write...>?
I mean, I want to do something like this:
<html:link href="getorg.do?id=<bean:write name="orglist"
property="id"/>"><bean:write name="orglist" property="id"/></html:link>
Of course, this doesn't work.
I want href to have the string "getorg.do?id=" concatenated with the output
from <bean:write name="orglist" property="id"/>
I suppose this must be done with a scriptlet. By the way, the "orglist" bean
comes from a logic:iterate over a vector of Beans (named "orglistview").
Anyone?
Thanks,
Antonio Santos
---------------------------------------------------------------------
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
Re: how to put a in a href=""
Posted by Mark Lowe <ma...@talk21.com>.
I hate dollar signs :o)
I'd do this
<html:link page="/gtorg.do"
paramId="id"
paramName="orglist"
paramProperty="id">
I Love Sparrows!!!
</html:link>
Mark
On Wednesday, Jun 4, 2003, at 17:03 Europe/London, Chen, Gin wrote:
> 2 possibilities without using scriplets:
>
> 1) Struts-EL:
> <html-el:link href="/getorg.do?id=${orglist.id}"/>
>
> 2) JSTL:
> <c:url value="/getorg.do">
> <c:param name="id" value="${orglist.id}"/>
> </c:url>
>
> -Tim
>
> -----Original Message-----
> From: António Santos [mailto:ansantos@fe.up.pt]
> Sent: Wednesday, June 04, 2003 12:54 PM
> To: struts-user@jakarta.apache.org
> Subject: how to put a <bean:write> in a href=""
>
>
>
> Hi all,
>
> Maybe this is a simple question, but I'm stuck with this:
> How can I set a href in a <html:link> tag with a string concatenated
> with a
> <bean:write...>?
> I mean, I want to do something like this:
>
> <html:link href="getorg.do?id=<bean:write name="orglist"
> property="id"/>"><bean:write name="orglist" property="id"/></html:link>
>
> Of course, this doesn't work.
>
> I want href to have the string "getorg.do?id=" concatenated with the
> output
> from <bean:write name="orglist" property="id"/>
>
> I suppose this must be done with a scriptlet. By the way, the
> "orglist" bean
> comes from a logic:iterate over a vector of Beans (named
> "orglistview").
>
> Anyone?
>
> Thanks,
>
> Antonio Santos
>
>
> ---------------------------------------------------------------------
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org