You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jean-Baptiste Lièvremont <mi...@gmail.com> on 2006/12/05 17:22:03 UTC

Re: [Tiles] Defining insert points in derived definitions [SOLVED]

Well, I got it working defining the 'pgList' attribute at top level
(in the 'standard' definition) and using 'importAttribute' in the
standard layout page to put it into the request scope, for the
'multiPane' content page to use it.

IMHO, it is a bit annoying to have do define it for all pages derived
from the standard layout, whereas only a "few" use it actually. Well,
it is still better than having to duplicate the entire layout page :)

Thanks for the quick and accurate answer, regards,
J.B.L

2006/12/5, Antonio Petrelli <ap...@apache.org>:
> See inline comments...
>
> Jean-Baptiste Lièvremont ha scritto:
> > * File: /WEB-INF/tiles-defs.xml
> >
*** SNIP ***
>
>
> The problems is that you want to read attributes inside non-layout
> pages. In your case your layout page is "standard.jsp" and you can read
> attributes (i.e. using <tiles:insert attribute....>,
> <tiles:useAttribute>, <tiles:importAttribute>) only in that page.
> To solve your problem, use <tiles:importAttribute> to import your
> attribute in request scope in "standard.jsp":
> <tiles:importAttribute name="pgList" scope="request">
> Then use it as a normal request-scoped bean.
>
> HTH
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>