struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <ced...@apache.org>
Subject Re: dynamic tiles:put
Date Sat, 08 Feb 2003 22:06:04 GMT

  Hi,

  Attributes of a definition are like parameters of a method: they can 
be defined before the method is called, but not after. Tiles allows you 
to define attribute dynamically before you insert the tile.
  In your case, you want to set an attribute of a parent tile inside a 
nested tile. This is not possible. However, you can do this with a jsp 
attribute, for example an attribute in the request scope.

  Hope this help,
     Cedric

Juri Smarschevski wrote:

> hi all,
>
> have a little problem with application structure.
> there is:
> <definition name="def.Simple" path="/WEB-INF/tiles/simple.jsp" >
>  <put name="js"   value="" />
>  <put name="body" value="" />
> </definition>
>
> <definition name="def.A" extends="def.Simple">
>  <put name="body" value="/WEB-INF/tiles/b.jsp" />
> </definition>
>
> [a.jsp]
> <tiles:insert definition="def.A" flush="true">
> <%--
>  <tiles:put name="js" value="var arrA=1;" type="string" />
> --%>
> </tiles:insert>
>
> The problem is the value of "js" should be dynamically
> determined in b.jsp. If I try to use tiles:put in
> [b.jsp]
>  <tiles:put name="js" value="var arrA=1;" type="string" />
>
> an exception is thrown:
> Error - tag put : enclosing tag doesn't accept 'put' tag.
>
> Is't possible to define a part of "definition" dynamically in
> other file as a.jsp ?
>
> thx in advance and regards,
> juri
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:struts-user-help@jakarta.apache.org>
>
>


---------------------------------------------------------------------
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