> -----Original Message-----
> From: Erik Price [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 30, 2003 5:19 PM
> To: Tomcat Users List
> Subject: Re: pass complex object to custom tag
> 
> 
> 
> 
> Tim Moore wrote:
> 
> >>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.
> > 
> 
> I have written everything according to the spec and now I am running 
> into some kind of a JavaBeans problem.  If anyone can help me 
> that'd be 
> great.
> 
> 1. The servlet has stored a UserBean into the session with 
> the key "user". 2. The JSP pulls the UserBean from the 
> session like this:
> 
>      <jsp:useBean id="user" 
> class="com.ptc.budgetease.beans.UserBean"/>
> 
> 3. My new custom tag tries to refer to the bean in one of its 
> attributes:
> 
>      <ptcbe:brltable size="small" list="
>          <jsp:getProperty name="user"
>                           property="mainPageBudgetRequestList"
>          />"
>      />
> (it is all on one line in the app, I broke it up for email)

Yeah, you can't nest a tag in the attribute of another tag like that.
It's not recognized as a rtexprvalue.

You'll have to do this:

<ptcbe:brltable size="small" list="<%= user.getMainPageBudgetRequestList
%>"/>

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


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

Reply via email to