You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kunal H. Parikh" <ku...@carsales.com.au> on 2004/03/10 01:50:54 UTC

Newbie Q

Hi All!

Can someone tell me as to how do I call <bean:write .../> inside <html:link
...></html:link>

Example:
<html:link href="<bean:write name="myBean" property="beanProperty" />">Link
Text</html:link>

I investigated a little abt nested tags, but I don't think that it is
applicable here.


TIA,


Kunal



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


Re: Newbie Q

Posted by Mark Lowe <ma...@talk21.com>.
<html-el:link page="${myProp}">

<a href="<c:url value="${myprop}" />">

or as has been suggested

<html:link page="<%= myProp %>">

on tc 5 and other jsp2 supporting containers el works without having to 
use an el library

<html:link page="${myProp}">




On 10 Mar 2004, at 04:12, Paul Stanton wrote:

> yes, but theres no other way (without writing your own tag) to put 
> "myProp" into the "href" attribute.
>
> Kunal H. Parikh wrote:
>
>> Will try this, but .... doesn't having <%=myProp%> mean that I am 
>> using a
>> scriptlet ? And, shouldn't our JSP not include scriptlets as far as 
>> possible ?
>
>
> ---------------------------------------------------------------------
> 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: Newbie Q

Posted by Paul Stanton <pa...@gunnsoft.com.au>.
yes, but theres no other way (without writing your own tag) to put 
"myProp" into the "href" attribute.

Kunal H. Parikh wrote:

> Will try this, but .... doesn't having <%=myProp%> mean that I am using a
> scriptlet ? And, shouldn't our JSP not include scriptlets as far as possible ?


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


RE: Newbie Q

Posted by "Kunal H. Parikh" <ku...@carsales.com.au>.
Will try this, but .... doesn't having <%=myProp%> mean that I am using a
scriptlet ?

And, shouldn't our JSP not include scriptlets as far as possible ?

Thanks for the help!


Kunal

-----Original Message-----
From: Daniel Henrique Alves Lima [mailto:email_daniel_h@yahoo.com.br] 
Sent: Wednesday, 10 March 2004 12:38
To: Struts Users Mailing List
Subject: Re: Newbie Q

I don't know if your construction is possible (i think it is). But try 
to use <bean:define> :

<bean:define id="myProp" name="myBean" property="beanProperty"/>
<html:link href="<%=myProp%>">Link Text</html:link>

Kunal H. Parikh wrote:

>Hi All!
>
>Can someone tell me as to how do I call <bean:write .../> inside <html:link
>...></html:link>
>
>Example:
><html:link href="<bean:write name="myBean" property="beanProperty" />">Link
>Text</html:link>
>
>I investigated a little abt nested tags, but I don't think that it is
>applicable here.
>
>
>TIA,
>
>
>Kunal
>
>
>
>---------------------------------------------------------------------
>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


Re: Newbie Q

Posted by Daniel Henrique Alves Lima <em...@yahoo.com.br>.
I don't know if your construction is possible (i think it is). But try 
to use <bean:define> :

<bean:define id="myProp" name="myBean" property="beanProperty"/>
<html:link href="<%=myProp%>">Link Text</html:link>

Kunal H. Parikh wrote:

>Hi All!
>
>Can someone tell me as to how do I call <bean:write .../> inside <html:link
>...></html:link>
>
>Example:
><html:link href="<bean:write name="myBean" property="beanProperty" />">Link
>Text</html:link>
>
>I investigated a little abt nested tags, but I don't think that it is
>applicable here.
>
>
>TIA,
>
>
>Kunal
>
>
>
>---------------------------------------------------------------------
>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