struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <>
Subject Re: how to pass attribute values from bean in tiles
Date Fri, 04 Aug 2006 06:52:30 GMT
mosho ha scritto:
> Hi,
> I have property pageTitle in my java bean.
> How can I pass that value to tile attribute?
> i have xml file, where I am defining my tile definitions.
> For example, if I include
> <tiles:insert attribute="title" beanName="pageTitle"
> beanProperty="common.Page" ignore="true"/>

Errr... no, you need to know that:
1) there is a "receiving tile" that exposes an attribute
2) there is a "sending tile" that puts the value in the attribute (note 
that I invented these terms right now :-) )
So in your "receiving tile" (let's call it "/receingTile.jsp") you 
expose your attribute the usual way:

<tiles:insert attribute="title" />

In your sending tile you have to fill it:

<tiles:insert template="/recevingTile.jsp">
    <tiles:put name="title" beanName="myBean" beanProperty="pageTitle" 
beanScope="???" />


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

View raw message