"wrong root element" error in facelets
Hi,
in facelets I have a problem, I get the following message see image:
But if i remove doctype, then error is gone. In Netbeans is all fine.
How can I resolve this problem?
Thanks.
Please sign in to leave a comment.
Hello.
I may be not enough familiar with facelets. Is that true that ui:composition element should be the root element, like on your screenshot? Samples I've found in Net all shows the ui:composition inside html element. Why not to do so?
Regards,
Alexander.
HI,
i found this:
THIS LINE, AND EVERYTHING ABOVE IT IS DISREGARDED BY JSF
at: http://docs.oracle.com/javaee/6/javaserverfaces/2.0/docs/pdldocs/facelets/ui/composition.html
or: https://facelets.java.net/nonav/docs/dev/docbook.html#template-composition
Cheers
Hi.
But in this sample ui:composition is not root, the root is <html>. This sample is highlighted correctly in IDEA, providing the file is xhtml and JSF support is added.
Regards,
Alexander.