You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zsolt Koppany <zk...@web.de> on 2002/04/09 15:26:49 UTC
Passing objects to taglib file
Hi,
I understand that I can pass Strings and numbers to taglib files, but how can
I pass other objects (for example a Vector)?
--
Zsolt
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Passing objects to taglib file
Posted by Jeff Larsen <la...@qec.com>.
Just do it!
<mytaglib:mytag data="<%= someVectorObject %>">
You need to support the object type in your getter and setter
methods for the tag attribute...
public Class MyTag extends TagSupport {
private Vector data;
public void setData(Vector newData) { data = newData; }
public Vector getData() { return data; }
...
}
You also need to use <rtexprvalue>true</rtexprvalue> in your tld.
Jeff
----- Original Message -----
From: "Zsolt Koppany" <zk...@web.de>
To: <to...@jakarta.apache.org>
Sent: Tuesday, April 09, 2002 8:26 AM
Subject: Passing objects to taglib file
> Hi,
>
> I understand that I can pass Strings and numbers to taglib files, but how can
> I pass other objects (for example a Vector)?
>
> --
> Zsolt
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>