struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <>
Subject Re: Tiles: Passing a bean to tiles in a definition file
Date Fri, 07 Jul 2006 06:50:55 GMT
Dan Langer ha scritto:
> From a design POV, it seems odd that a piece
> of functionality (the beanName attribute) would be there when invoked
> one way (JSP), but not when invoked another (XML definition).

I agree with you, I think that this functionality isn't there for 
technical reasons, simply because Tiles definitions, when they are 
loaded, don't know about page scopes, that is needed to resolve beans.
Why don't you open a bug ticket for that?

> My goal was to create a generic tile (to display a table), and then to pass
> it different beans depending on what data I wanted to show. I've created
> a definition for the generic one, but I can't think of how to use JSTL
> (useBean is what I assume you're suggesting) to allow me to pass the
> bean name as an "argument" to the tile when, it's defined using
> inheritance in the XML definitions file (my plan was to extend the
> generic one for each of the various types of data I was going to
> display).

In fact, I meant that you would put, for example, your bean in request 
scope from your action class and then read it the usual way (with 
<c:out>, <html:text> etc.).
Does it solve your problem? Or do you need something different to 
accomplish your needs?


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

View raw message