Hi Leonardo,
Comments: The tag ui:insert inside composite:implementation should
not take
into account definitions made "outside" it.
agreed
Comments: definitions inside ui:include referenced page should ignore
what
is outside it.
agreed
As you can see, there are some situations where the tag semantic
requires
isolate the context where the templates are resolved. After do some test I
identified these cases:
- Composite components
- ui:include
- User tag handlers (facelets tags from xhtml files)
The solution implemented on myfaces is use a class called TemplateContext,
that encapsulates template operations, and use a stack to isolate the
different context. When a new context is required a new TemplateContextImpl
is created and pushed on the stack. When it is no longer required it is
removed from the stack. If it is necessary to resolve the markup on the
previous context, we temporally pop the context from the stack and the push
it again. It passes all tests proposed.
makes sense
I'm still thinking about how template client api should be to
write a
proposal about it, but I wanted to comment this stuff because it could be of
interest here.
thanks for the heads up, Leonardo. @Andy: you had commented that
Facelets is inheriting down the ui:defines hierarchically, where it
should rather not... Now this seems pretty similar, but even worse: it
is also "inheriting up". We certainly need to revise this Facelets
code here.
best regards,
Martin