2011/10/10 Kai <[email protected]>

> In my real problem, list.jsp ist much more complex and I want to reuse it
> on several pages. The only part of list.jsp which changes from page to page
> is the part in dynamic.jsp, which is bind in in the definition.
>
> Therefore I cannot "hartcode" the Template with a <t:insertAttribute>-Tag
> inside the list.jsp-Template. Because then, I would have to copy list.jsp
> for every page and would end up with several versions of list.jsp, which
> only differ in this one <t:insertAttribute>-Tag. That would not be good,
> because I would have to edit several nearly identical copies, if I want to
> change list.jsp later on!
>

Try to explain your use case further, maybe there are better solutions (e.g.
ViewPreparer).


> The problem is that list.jsp and dynamic.jsp are two different pages. Just
>> like<jsp:include>  paged-scope attributes in including page are not
>> visible
>> in the included one (and viceversa).
>>
>
> Yes, that's true!
>
> But I have understand, that the EL in the XML-definition is evaluated, when
> the definition is inserted. In case of the nested anonymous definition, that
> would happen while the forEach-Loop is renderd.
> Therefore I had concluded that the EL sees the environment of that moment
> and that page.
>

It's true that EL is evaluated when the inserted page is rendered, but the
*value* of the attribute is in the page that includes it.


> The later would - in my view - be a bug, or, to put it in other words:, it
> would be nice feature to have, if the EL would see the page-scope variables
> or even the nested scoped variables of the moment, where it is inserted.
> Because, then the EL in the definition would behave exactly the same way, as
> the EL in your solution above!
>

Not a Tiles problem, anyway.

Antonio

Reply via email to