-
1. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Oct 9, 2007 11:46 AM (in response to dsleeper)Correction:
The content that gets duplicated is this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > -
2. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Oct 9, 2007 11:47 AM (in response to dsleeper)Darn.. this forum does not seem to support the text I was pasting in. After the doctype declaration the tags gets rendered also. That is the main problem which I am trying to figure out a solution for
-
3. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Oct 9, 2007 11:48 AM (in response to dsleeper)Jesus, here it is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <html xmlns="http://www.w3.org/1999/xhtml">
-
4. Re: Facelets ui:include problems with richfaces/ajax4jsf
juanignaciosl Oct 9, 2007 12:02 PM (in response to dsleeper)I use a similar environment, and here is how I deal with this:
1.- Pages are .jspx.
2.- web.xml:
<context-param>
<param-name>
javax.faces.DEFAULT_SUFFIX
</param-name>
<param-value>.jspx</param-value>
</context-param>
3.- Pages begin with this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:s="http://myfaces.apache.org/sandbox"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
xmlns:c="http://java.sun.com/jstl/core">
<ui:composition>
... and end like this:
</ui:composition>
</jsp:root>
This works and also make MyEclipse autocomplete work.
Hope this helps -
5. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Oct 9, 2007 2:06 PM (in response to dsleeper)Thx alot! That does the trick...
Too bad I have to change this in a gazillion files :-) I will cope though.
Thx again! -
6. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Oct 10, 2007 5:06 AM (in response to dsleeper)After further investigation facelets still render duplicates of:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns="http://www.w3.org/1999/xhtml">
But that is of course better than duplicating the<html>
code... So it does in fact make my documents valid I guess.
Any way to make it take away the<jsp:root>
elements too? -
7. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Nov 5, 2007 6:51 AM (in response to dsleeper)The jsp:root element rendering fucks up browser rendering for Safari.
Has anybody got a solution to prevent jsp:root being rendered? -
8. Re: Facelets ui:include problems with richfaces/ajax4jsf
mgrouch Nov 5, 2007 10:39 PM (in response to dsleeper)Why do you have jsp:root if you are using facelets?
Do not mix facelets with jsp in same page -
9. Re: Facelets ui:include problems with richfaces/ajax4jsf
dsleeper Nov 6, 2007 3:08 AM (in response to dsleeper)Please read the whole post if you want to understand why I use jsp:root