2009/5/10 Dan Allen <dan.j.allen@gmail.com>
On Sat, May 9, 2009 at 4:00 PM, David Geary <clarity.training@gmail.com> wrote:
2009/5/7 Norbert Truchsess <norbert.truchsess@t-online.de>you can ommit the xml-declaration being passed through by using
ui:composition:
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets">
<?xml version='1.0' encoding='utf-8'?>
<f:view>
<af:document/>
</f:view>
</ui:composition>
Yes, and this should be a recommended practice, should it not?
However, the preceeding fragment is XML, not XHTML. If you have a view implemented as a composition, and you reference it as an action of a button or link, the corresponding file must have a .xhtml extension, or the navigation handler won't find it. IOW...
<h:commandButton ... action="welcome"/>
...means the navigation handler will look for welcome.xhtml. If you name the file welcome.xml, you get an error message at runtime. But if welcome.xhtml uses a composition, like the preceeding code fragment, it's not an XHTML file, it's XML. Ugh.
Should the navigation handler also look for welcome.xml, or is that too naiive of a fix?
Why don't you just make the javax.faces.DEFAULT_SUFFIX .xml?
I suppose you want to have a gradual migration.
In that case, why can't JSF support multiple extensions, searched in priority order. I guess that is something an impl could provide (since migrations are something that you might look to a vendor to help you solve). The spec should assume you are using a single type (I guess).
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
http://mojavelinuxcom
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.