Tim Moore wrote:
-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 3:22 PM
To: Tomcat Users List
Subject: pass complex object to custom tag


Is there a way to pass something other than a string to a custom tag through the attributes?

I have a class I've written and I'd love to find a way to pass it to a custom tag for processing. This would separate the display logic from the business logic.

<jsp:useBean id="user" class="UserBean" />

<ptcbe:mainpagetable src="<%= user.getBudgetList() %>" />

This didn't work?  Just make your tag handler have a method like
setSrc(UserBean src) and that should work fine.

Oh, my mistake then -- I was reading examples of custom tags and they all seemed to use strings, so I assumed that you had to parse the strings to make anything more complicated than a string (such as a serialized object or something). I guess that's only if you don't use a JSP exprssion (you hard code an attribute value).


Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to