On 25/03/2004 13:22, "Mariano Garc�a" <[EMAIL PROTECTED]>
wrote:
> El mi�, 24-03-2004 a las 20:21, Pedro Salgado escribi�:
>> Below is a reply sent to this mailing list about something very similar to
>> what you are looking for.
>
> but there is any way to use dynamic content only using tiles tags? In my
> case, I have a 'setAttribute("serverLocation", Location)' function in an
> Action in order to store a bean with a location information.
>
> Location is a string (an url), so I want to use this url into a tile
> definition, like this:
>
> <definition name="tracebox.def.encoderconfig"
> extends="tracebox.def.menu">
> <put name="title" value="encoderconfig" />
> <put name="body" value="LOCATION" />
> </definition>
>
> I think it must be a "easy" solution, using tile tags.
>
The way I presented to you is the cleaner one :)
If you define the put declaration in Tiles it will always be static (at
least for what I understood and read so far).
If you want to make a tiles attribute dynamic, you must specify and
implement the tiles controller (described in the other mail).
The not so "clean" solution is to use a tiles template with a <c:import
url='${request.dynamicTilesAttribute}'/> inside.
> what do you think?
I guess this is not a question of what I think... It is more of how it
works :)
This could be a nice feature to Tiles though.
One could implement a Tiles controller that made this possible. You just
needed to parse all of attributes for ${scope.Attribute} values => it would
be inneficient most of the attributes are static. If the put declaration had
a dynamic attribute (true/false) it would certainly much more
interesting/efficient. Maybe I will try and do this on my weekend ;)
Pedro Salgado
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]