This code, a test case for a custom component using JSF2
Just for the record, the file: panel.xhtml , located at /resources/panels/panel.xhtml
test.xhtml:
<head>
</head>
<body>
<panels:panel/>
</body>
</html>
Returns the following html:
<!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" xmlns:panels="http://java.sun.com/jsf/composite/panels">
<head>
<script ...></script></head>
<body>
<panels:panel></panels:panel>
</body>
</html>
Why is not being rendered? Maybe because I’m using Richfaces 3.3.3.Final and I have the param in web.xml so Richfaces can work with JSF2? I tried disabling it but then the server does not start so I can’t try if this is the problem.
<context-param>
<param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>
Does anybody know if this is the problem? In case it is, it is not allowed yet to use the new custom components feature and Richfaces 3.3.3.Final together?
Update: I’ve checked Richfaces 4.0 Alpha and it does not have all the components of 3.3.3.Final yet implemented so it’s not an option.
JSF 2.0 composite components won’t work with RichFaces 3.3.3 as they are based on JSF 2.0 VDL. Please check limitations section in this document