dev@jsftemplating.java.net

Re: JSFTemplating: Facelets Migration

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Mon, 04 Aug 2008 10:41:25 -0700

Hi Oliver,

I noticed you have:

    <param-name>facelets.LIBRARIES</param-name>

I don' t this this is supported in JSFT yet.  Feel free to file an issue to remind us to add this.  Also, some things in facelets taglibs are not supported.  Essentially we only support defining UIComponents in the taglibs (which is what most taglibs do).

    <param-name>facelets.DEVELOPMENT</param-name>

This isn't needed for JSFT, instead use the JSFT debug param (you already have that).

    <param-name>facelets.SKIP_COMMENTS</param-name>

This isn't supported by JSFT afaik, you can file a request to support this as well.  Related to this, I've talked to Jason about maybe supporting a "skip white-space" option which will optionally allow skipping of whitespace between tags.

I don't see anything wrong w/ your composition.jspx / template.html files.  I'll try them out when I have time later today.

Ken


Oliver Wolff wrote:
Hi Jason

Thanks for your prompt answer.

With other xml-Formats I meant jspx instead of xhtml.

Find attached the corresponding layout and composition page.


Regards
Oliver

Jason Lee schrieb:
On Mon, Aug 4, 2008 at 6:44 AM, Oliver Wolff <oliver.wolff@oio.de> wrote:
1: Do I have to use xhtml files or can I use other XML-Formats as well?
Currently I'm using jspx (Hack for eclipse: autocomplete with facelets).

I'm not entirely sure what you mean by "XML-Formats" but JSFTemplating
only requires (currently) that the page be valid XML and doesn't care
about file extensions.

2: How can I make it work at all? Currently I´m trying to use a templated
<ui:compostion> layout but only the <ui:compostion></ui:compostion> part of
the composition.jspx is rendered (literally without processing / replacing)
without the content of the corresponding layout page. Is <ui:compostion>
supported at all?

Yes.  In fact, it was one of the first tags to be supported (I use it
a lot, fwiw).  My guess is that JSFTemplating isn't recognizing the
file as one it should process, so it delegates to the default
ViewHandler, which doesn't understand, so it's rendered literally.
Could you email a small example of one of your pages?  We could then
make sure the template reader is finding what it needs, or make the
reader more robust.

3: What is the correct configuration? I found a side-by-side example
(facelets and jsftemplating)
(http://java.sun.com/developer/technicalArticles/J2EE/jsf_templating/) but I
want to use a single ViewHandler not two: What configuration is needed
therefore? As far as I understand:

faces-config
No <view-handler> needs to be configured, the configuration will be taken
from the jsftemplating.jar

web.xml:
<context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.jspx</param-value>
</context-param>
<context-param>
       <param-name>com.sun.jsftemplating.VIEW_MAPPINGS</param-name>
       <param-value>*.jsf</param-value>
</context-param>
<context-param>
       <param-name>facelets.LIBRARIES</param-name>
       <param-value>
               /faceletComponent/faceletCustomTags.xml;
       </param-value>
</context-param>

Is there anything more that needs to be configured? Do I need any more Libs
for facelets support?

With JSFTemplating, all you typically have to do is drop the jar in
your classpath and you're set (correct me here if I'm wrong, Ken).
There are some context-params that JSFTemplating understands, but I
don't think they're necessary unless you need to override the
defaults.

Container & Libs:
Woodstock 4.3 build 6
JSFTemplating May Stable, current nightly (4th August)
RI 1.2 09
Tomcat 6.016
JDK 6
Eclipse 3.4

As far as I know, there should be nothing in that setup that would
break JSFT support, but maybe Ken can chime in when he comes online.
In the meantime, if you can send that small page sample, I'll take a
look at it and the template reader (which I wrote, fwiw).


Welcome

Layout Content

Content will be put here