[jsr-314-open-mirror] [jsr-314-open] PostAddToViewEvent publishing conditions

Leonardo Uribe lu4242 at gmail.com
Wed May 19 23:15:28 EDT 2010


Hi

I tried the proposal of use some variation of TemplateClient API (I attach
it as reference on MYFACES-2638-6.patch ). The solution works for simple
cases, but it does not when nested composite components are used.

Look this example (I removed the non relevant code):

testCompositeInsertChildren.xhtml (the page when it is used)

<testComposite:compositeInsertChildren>
    <h:outputText value="GAMMA " />
</testComposite:compositeInsertChildren>

testComposite:compositeInsertChildren

<composite:implementation>
    <testComposite:compositeInsertChildrenInner>
        <h:outputText value="BETA " />
        <composite:insertChildren />
    </testComposite:compositeInsertChildrenInner>
</composite:implementation>

testComposite:compositeInsertChildrenInner

<composite:implementation>
    <h:outputText value="ALFA " />
    <composite:insertChildren/>
    <h:outputText value="OMEGA " />
</composite:implementation>

The example should render this:

ALFA BETA GAMMA OMEGA

But it is rendered this:

ALFA GAMMA OMEGA

The current algorithm do it correctly because the tree is completely built
before relocate, so the listener relocates BETA too. Facelets executed the
inner FaceletHandler instance first and then the outer ones. On composite
components, it executes first the composite component facelet, then the
FaceletHandler children.

Suggestions are welcome.

regards,

Leonardo Uribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100519/86fa03e1/attachment-0002.html 


More information about the jsr-314-open-mirror mailing list