You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Praveer Mathur <pr...@delhi.tcs.co.in> on 2002/06/04 11:00:18 UTC
Passing Dynamic values to tags
Hi All,
When I use tags in Apache tag libraries in my JSPs, I am able to pass
dynamic values from Java as its attributes.
Ex - <lib: form form name = <%=formname%>
However when I write my own tags, I can only pass constant attibutes as the
tag replaces the attribute vales as as a string instead of treating it as
Java code that needs to be executed. Any clues what I need to do to make my
tags accept dynamic values? or rather what has Apache done so that it takes
it?
Thanks in advance.
Regards,
Praveer
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Passing Dynamic values to tags
Posted by Nicolas De Loof <ni...@cgey.com>.
Your taglib definition file (tld) can declare an <rtexprvalue> element for
attributes of your tags. "true" value allows JSP to use "runtime expression
values".
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
Nico
> Hi All,
>
> When I use tags in Apache tag libraries in my JSPs, I am able to pass
> dynamic values from Java as its attributes.
> Ex - <lib: form form name = <%=formname%>
>
> However when I write my own tags, I can only pass constant attibutes as
the
> tag replaces the attribute vales as as a string instead of treating it as
> Java code that needs to be executed. Any clues what I need to do to make
my
> tags accept dynamic values? or rather what has Apache done so that it
takes
> it?
>
> Thanks in advance.
>
> Regards,
> Praveer
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Passing Dynamic values to tags
Posted by Dejan Bosanac <de...@datagate.co.uk>.
You need to modify your Tag library descriptor and put
<rtexprvalue>true</rtexprvalue> inside <attribute></attribute> tags for
attributes that needs to be dynamically assigned.
--
Best regards,
Dejan Bosanac, Software Developer
DataGate Network Solutions Ltd. - http://www.datagate.net
Tel: +44 8700 119090, Fax: +44 8700 119080
----- Original Message -----
From: "Praveer Mathur" <pr...@delhi.tcs.co.in>
To: "Struts Developers List" <st...@jakarta.apache.org>
Sent: Tuesday, June 04, 2002 11:00 AM
Subject: Passing Dynamic values to tags
> Hi All,
>
> When I use tags in Apache tag libraries in my JSPs, I am able to pass
> dynamic values from Java as its attributes.
> Ex - <lib: form form name = <%=formname%>
>
> However when I write my own tags, I can only pass constant attibutes as
the
> tag replaces the attribute vales as as a string instead of treating it as
> Java code that needs to be executed. Any clues what I need to do to make
my
> tags accept dynamic values? or rather what has Apache done so that it
takes
> it?
>
> Thanks in advance.
>
> Regards,
> Praveer
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>