tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Larsen" <lar...@qec.com>
Subject Re: Passing objects to taglib file
Date Tue, 09 Apr 2002 17:25:51 GMT
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" <zkoppany@web.de>
To: <tomcat-user@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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message