dev@jsftemplating.java.net

Re: JSFTemplating: Facelets Migration

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Tue, 05 Aug 2008 09:02:49 -0700

Oliver Wolff wrote:
> Hi Ken, Hi Jason
>
> Thanks for your input. I got the first working jsftemplating-faceletes
> output:
>
> What did I do:
>
> I used xhtml for the the composition File AND for the layout file. The
> layout file needs the suffix xhtml otherwise there will be thrown an
> exception
> "No LayoutDefinitionManager available for
> '../composition/layout.html'. This may mean the file cannot be found,
> or is unrecognizable.
> "
>
> What did not work compared to facelets:
> layout.xhtml:
> <w:head debug="false" webuiAll="true" webuiJsfx="true" styleSheet="true">
> <f:facet name="title">
> <ui:insert name="page_title">Default Title</ui:insert>
> </f:facet>
> </w:head>
>
> using this way for the title results in an empty title-tag and the
> <ui:insert name="page_title"> output rendered to a wrong position
> (plain text, without title tag. see result.xhtml)
> What is the way for jsftemplating to do something like that?
I think the bug in JSFT here is that <ui:insert /> is not working inside
a <f:facet>. I think the limitation is that <ui:insert /> must be in a
UIComponent -- can you please file a bug on this on the JSFT Issue
Tracker? You can try this as a work-a-round:

    <f:facet name="title">
        <w:panelGroup>
            <ui:insert name="page_title">Default Title</ui:insert>
        </w:panelGroup>
    </f:facet>

This will ensure it is inside a UIComponent.
> Another thing is using your own taglib "facelet-components".
> You wrote that the parameter "facelets.LIBRARIES" is not supported by
> JSFT yet. Is there an other way to do this? Because I remember reading
> something about JSFTs ability to process facelets-taglibs.
Jason can correct me if I'm wrong. But I think it automatically
processes any files in META-INF/* which end in taglib.xml. I don't
think it would be difficult to add the facelets.LIBRARIES support...
Jason, any comments?

Thanks!

Ken
>
> Regards
> Oliver