[jboss-user] [JBoss Seam] - Re: is xhtml a good choice for Facelets templates?
do-not-reply at jboss.com
Fri May 25 02:35:19 EDT 2007
I guess that a lot of us are using facelets as building blocks in componentized user interfaces. In my current application, only the top level templates could rightly be called xhtml files i.e. they look something like:
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| <title><ui:insert name="pageTitle">
| ... stuff ...
a lot of my other facelets look something like:
| <sl:gridPage xmlns:sl="http://mycompany.com/myapp" />
which is not really xhtml, whatever way you spin it. But I'm a pragmatic sort of person and am not that bothered about changing file extensions for the sake of it.
However, the "pondering facelets file extensions" thought process did lead me down another road which is sort of related. I got to wondering if I should actually move away from xml to specify facelets?
In particular, my application has a very data driven, modular ui that has a lot of dynamic view building and depends heavily on the <c:> tags for the view tree building logic. In my xhtml files this is transparently interspersed with the uicomponent's themselves and a liberal dose of jsf render-time logic, which is bloody confusing to read and maintain.
Apart from the top level templates there's not a lot of mixed content (which xml style markup handles gracefully).
I am beginning to wonder if a groovy based dsl wouldn't be much more concise and expressive for building complex facelets composition component's.
I want something that stays in the scripting domain, to avoid needing to redeploy during UI hacking.
Has anybody done anything like this?
Oh, to stay on-topic with the original thread, I propose that these files should be known as Facelets User Composition Komponents, with an appropriate extension.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048576#4048576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048576
More information about the jboss-user