You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "bmilbratz@outstart.com" <bm...@outstart.com> on 2006/10/12 19:41:06 UTC

tile problem: how to find the "put" tag name attribute from called jsp/servlet

Hi,

This is a tiles "how can I do this" question.  Can a jsp/servlet  called 
via the tiles 'put' tag know it's "region" name?

For example, can the 'getcontent'  servlet  (below) know get the 'name' 
attribute of the 'put' tag, is "center section"?

 <definition
      name="/include/tiles/simple.jsp" page="include/tiles/simple.jsp">
  <put name="title" value="My title" direct="true"  />
  <put name="center_section" direct="true" path="/servlet/getcontent"/> 
 </definition>

I know that we can define tiles via xml or jsps. And that the 'put' can 
include either a jsp, servlet or another tile definition. Also that the 
we can use a tile controller to 'pre-load' data into the tilecontext.

What's not clear: whether the tile "body" knows 'from whence its called'.

thanks,

bill m  




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


[tiles] Re: tile problem: how to find the "put" tag name attribute from called jsp/servlet

Posted by Antonio Petrelli <ap...@apache.org>.
bmilbratz@outstart.com ha scritto:
> Hi,
>
> This is a tiles "how can I do this" question.  Can a jsp/servlet  
> called via the tiles 'put' tag know it's "region" name?
>
> For example, can the 'getcontent'  servlet  (below) know get the 
> 'name' attribute of the 'put' tag, is "center section"?
>
> <definition
>      name="/include/tiles/simple.jsp" page="include/tiles/simple.jsp">
>  <put name="title" value="My title" direct="true"  />
>  <put name="center_section" direct="true" path="/servlet/getcontent"/> 
> </definition>

Short answer: no. But the question is: what do you want it for? I mean, 
I don't see anything obviously useful, except of some debugging 
information...

Ciao
Antonio

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