struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <ced...@apache.org>
Subject Re: Tiles useAttribute
Date Sat, 08 Feb 2003 22:17:11 GMT

  Hi,

  Tiles attributes are like method parameters: they are only accessible 
in the current tiles or method. They aren't accessible in parent or 
nested tiles.
  But, you can pass them explicitly to the nested tile in your template.jsp:

  <tiles:insert attribute="Footer" >
    <tiles:put name="Section" beanName="Section" beanScope="tiles" />
  </tiles:insert>

  Hope this help,
    Cedric

Max Kremer wrote:

>Hi I'm new to Tiles and I'm trying get some basic stuff working but I'm having a problem
passing attributes.
>My definition XML file looks like this:
>
><tiles-definitions>
>  <definition name=3D"mainTemplate" path=3D"/mainTemplate.jsp" >
>   <put name=3D"Section" value=3D"/partfetch"/>
>   <put name=3D"TopMenu" value=3D"/includes/inc_TopMenu.jsp" />
>   <put name=3D"Body" value=3D"/inc_PartDetails.jsp" />
>   <put name=3D"Footer" value=3D"/includes/inc_Footer.jsp" />
>  </definition>
></tiles-definitions>
>
>Now I'm trying to get the value of the "Section" attribute in the inc_Footer.jsp but I
get the following error:
>
>[ServletException in:/includes/inc_Footer.jsp] Error - tag useAttribute: attribute 'Section'
not found in context. Check tag syntax'=20
>
>What am I doing wrong?
>
>Thanks
>Max
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message