struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Accessing a Bean from a bean using EL with STRUTS 2 - I really need help
Date Sat, 07 Apr 2007 18:50:31 GMT
--- wrote:
> <jsp:useBean id="accountBean"
>              type="billing.AccountBean" 
>              scope="request"/>

is sufficient, but it's still not clear to me why
you're using <jsp:useBean.../> at all.

> <ui:dataGrid items="${accountBean.invoices}" [...]

If accountBean has an appropriate getInvoices() method
and whatever this taglib is you're using expects it, I
don't know (yet, anyway) what the problem would be.

> Now How can I set a bean called invoices to the
> value of  the bean "account.invoices" ?

You have to say *what's actually happening* in order
for anybody to help you. You have to say what taglib
you're using so people that have used it can provide
input based on their prior experience. You should
probably answer my JSP 2.0 question, although that
depends somewhat on the taglib; it might not matter.

As I said: the StrutsRequestWrapper automagically
exposes OGNL stack values to JSTL; if your action has
a getAccountBean(), which it does, then
${accountBean.invoices} will get it under a JSP 2.0
container or a taglib that understands JSP EL
(assuming accountBean has a getInvoices()).

If you do a <c:forEach.../> over
${accountBean.invoices} does it work? Things like that
are helpful to know, especially when you are dealing
with a tag library that not everybody will have used.

If you're still getting the TLD error then your
problem is occuring before any of the above even
matters (I think!)

Help us to help you.


Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message