Tiles 2.1.3 -----Original Message----- From: Antonio Petrelli [mailto:[email protected]] Sent: Tuesday, October 06, 2009 2:02 PM To: [email protected] Subject: Re: Session Attribute in Tiles Definition
First of all, what version of Tiles are you using? The answer depends on this. Antonio 2009/10/6 Smith, David W <[email protected]>: > Is it possible to add attributes from the session to the put attribute > of a tiles definition. I would like to do something like... > > <definition name="SalesRates_application.layout" > extends="general.logon.layout"> > <put-attribute name="title_page_name" value="Sales > ${sessonScope.SALES_RATES_SERVICE_TYPE} Rates" /> > </definition> > > What do I need to setup to allow the expression language to be able to > parse the session attribute. Can Struts 2 expressions such as > %{#session.SALES_RATES_SERVICE_TYPE} also be used? > > The expression language support page on the tiles web site has the > example > > <definition name="test.composite.el.definition" > templateExpression="${layout}" > preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer"> > <put-attribute name="title" value="This is a configured composite > definition."/> > <put-attribute name="header" value="/header.jsp"/> > <put-attribute name="body" expression="${requestScope.body}"/> > </definition> > > Where does the templateExpression= and expression= attributes come from? > I don't see them defined in the tiles reference sheet. > > David Smith > > > > >
