views:

73

answers:

2

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"&gt;

<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.

A: 

Don't rerender Panel rerender the form of the panel. and to include panel use

And I hope you might be using richfaces filter in web.xml

enter code here : <a4j:commandLink id="abclink" oncomplete="#{rich:component('abcPanel')}.show()" reRender="abcForm"/>
taher
The problem is that it does not render the tag `<panels:panel>`. I've edited my question to clearify it.
pakore
don't use <panels:panel>to include panel use <ui:include src="panel.xhtml"> in your page to inclde panel.
taher
+1  A: 

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

mikalaj