2009/5/10 Dan Allen <dan.j.allen(a)gmail.com>
On Sat, May 9, 2009 at 4:00 PM, David Geary <clarity.training(a)gmail.com>wrote:
> 2009/5/7 Norbert Truchsess <norbert.truchsess(a)t-online.de>
>
>> you can ommit the xml-declaration being passed through by using
>> ui:composition:
>>
>> <?xml version='1.0' encoding='utf-8'?>
>> <ui:composition
xmlns:ui="http://java.sun.com/jsf/facelets">
>>
xmlns:f="http://java.sun.com/jsf/core"
>>
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
>> <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 thought about that, but it begs the question: why is the default suffix
xhtml to begin with? Shouldn't it really be XML?
I suppose you want to have a gradual migration.
Nope, I just want compelling examples for Core JSF. :)
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).
Sounds like a good idea to support multiple extensions. Why should the spec
assume a single type--what's the advantage to that over multiple types?
Thanks,
david
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
http://mojavelinux.com
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.