tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai <...@ich-geh-kaputt.de>
Subject Re: EL-Expression in definition ignores page-scope
Date Mon, 10 Oct 2011 12:53:19 GMT
Am 10.10.2011 12:22, schrieb Antonio Petrelli:
> Very interesting and challenging question.
Yes :)

> I suppose that these "dynamic" pieces have something in common (e.g. an id,
> an URL of the picture). This data can be passed as an attribute. The rest,
> i.e. the specialized links/operations that you do on each picture, should be
> computed internally in each piece, is it right?

The forEach-Tag iterates over a set of instances of the class picture.
These Instances hold every information, that is needed to compute the 
links etc., so the actual picture-instance in loop x is the only 
information, which has to be passed to the called template.

So I think, the answer is jes.

> If yes, list.jsp can be reused anywhere (I mean for any kind of picture
> template), as long as you identify all the needed data that each piece
> needs, and pass them always, even if they don't use it.
>
And how do I change the called template in the XML-definitions?
Do you suggest to define an additional attribute in the specialised 
definition, which holds the path to the template and then inject that 
attribute to the template-attribute of the <t:insertAttribute>-Tag?

[..]
>> I had expected, that the EL would behave in the same way it behaves, when
>> it is written in the<t:insertAttribute>-Tag like in your last mail...
>>
>
> No, in my example, the EL expression is evaluated then passed to the
> attribute. In your example, the attribute is rendered and, when rendering,
> the EL expression is evaluated (to nothing).
>
O.k.
I think, I got that now.

But in my view, it would be a really nice feature, if it would work how 
I had it expected to. It would ease the understandig of how the 
EL-Expressions in definitions work and it would hugely widen the 
applicability of EL-Expressions in definitions.

I would like to try to implement that behaviour. But I don't know, if I 
am able to find the right lines of code, to alter. So far, I debuged my 
way into the class, that creates the TilesApplicationContext for the 
evaluation of the expression. But I'm lost there - somwhere...


Greetings kai
> Antonio
>


Mime
View raw message