myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (MYFACES-2753) Trivial multi-level templating does not work if ui:include is used
Date Wed, 14 Jul 2010 04:39:51 GMT


Leonardo Uribe commented on MYFACES-2753:

Hi Martin

Jakob K >> I want to change ui:composition from extendClient() to pushClient(), so I
don't really know if it is that what you want to say. 

Yes, I'm saying that change from extendClient() to pushClient() on ui:composition will not
work. I'll commit some junit tests to start building the test case.

Jakob K >> All I am saying now is that the current algorithm is incorrect and pretty
messy and thus really needs a fix. 

Totally true. There is something wrong with the current algorithm.

Martin M >> I don´t have the time to look into this more right now, but maybe you guys
can start off a good discussion with Max and Andy - nobody seems to be absolutely clear about
this API, so it is worthwhile spending some time on this. If you get a good understanding,
why don't you document it so that everybody will be able to get it... 

Yes, that's also part of the plan. The intention is propose a template client api. Right now,
there are already some code in that direction in myfaces (org.apache.myfaces.view.facelets.TemplateContext,
apply template client concept to composite components). The next step is handle this point,
and I hope when we have a clear idea about how template client should looks like, discuss
it on jsr-314-open list.

with best regards,

Leonardo Uribe

> Trivial multi-level templating does not work if ui:include is used
> ------------------------------------------------------------------
>                 Key: MYFACES-2753
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2-SNAPSHOT
>         Environment: myfaces core trunk (2.0.2-SNAPSHOT), tomcat 6.0.26
>            Reporter: Martin Kočí
>            Assignee: Jakob Korherr
>         Attachments: MYFACES-2753-tests.patch, MYFACES-2753.patch, MYFACES-2753.tar.gz
> Following example does not produce any output:
> OuterClient.xhtml
> <ui:decorate
>     template="/templates/OuterTemplate.xhtml"
>     xmlns:ui="">
>     <ui:define name="content">
>         <ui:include src="InnerClient.xhtml" />
>     </ui:define>
> </ui:decorate>
> OuterTemplate.xhtml:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "">
> <html
>     xmlns=""
>     xmlns:ui=""
>     xmlns:f=""
>     xmlns:h="">
> <f:view>
>     <h:head>
>         <title>title</title>
>     </h:head>
>     <h:body>
>         <ui:insert name="content" />
>     </h:body>
> </f:view>
> </html>
> InnerClient.xhtml:
> <ui:composition
>     template="/templates/InnerTemplate.xhtml"
>     xmlns=""
>     xmlns:ui="">
>     <ui:define name="content">
>         Do you see me?
>     </ui:define>
> </ui:composition>
> InnerTemplate.xhtml:
> <f:subview
>     xmlns:ui=""
>     xmlns:f="">
>     <ui:insert name="content" />
> </f:subview>
> But if OutterClient.xhtml looks like:
> <ui:decorate
>     template="/templates/OuterTemplate.xhtml"
>     xmlns:ui="">
>     <ui:define name="content">
>         <ui:composition template="/templates/InnerTemplate.xhtml">
>             <ui:define name="content">
>                 Do you see me?
>             </ui:define>
>         </ui:composition>
>     </ui:define>
> </ui:decorate>
> it outputs "Do you see me?" which is expected result in both cases. I think first case
should work too - or am I missing something?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message