2015-11-03 61 views
0
<?xml version="1.0" encoding="ISO-8859-1" ?> 
<!DOCTYPE html> 
<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
       xmlns:ui="http://java.sun.com/jsf/facelets" 
       xmlns:h="http://java.sun.com/jsf/html" 
       xmlns:jsf="http://xmlns.jcp.org/jsf" 
       xmlns:c="http://xmlns.jcp.org/jsf/core" 
       xmlns:f="http://java.sun.com/jsp/jstl/core" 
       xmlns:rich="http://richfaces.org/rich" 
       xmlns:a4j="http://richfaces.org/a4j" 
       xmlns:pe="http://primefaces.org/ui/extensions" 
       xmlns:gestenis="http://gestenis.com/jsf/facelets"> 

    <c:view> 
     <body jsf:id="staffBody"> 

      <a4j:form id="pfform" > 
       <h:panelGrid> 
        <rich:tabPanel switchType="ajax"> 
         <rich:tab label="First"> 
          Here is tab #1 
         </rich:tab> 
         <rich:tab label="Second"> 
          Here is tab #2 
         </rich:tab> 
         <rich:tab label="Third"> 
          Here is tab #3 
         </rich:tab> 
        </rich:tabPanel> 

.... 

结果是:富人:一个tabpanel不渲染

这里是标签#这里是标签#这里是标签#3

所有在一条线,所以不使其正确

任何想法?

谢谢

+0

所以你正在做一切就像在他们的现场演示,你会得到不同的结果? http://livedemo.exadel.com/richfaces-demo/richfaces/tabPanel.jsf – cristianhh

+0

我现在有同样的问题! –

回答

0

的解决方案是:

没有它添加的jar依赖的类路径中(的webapps/lib中)丰富的组件没有转换成HTML 。

0

可能在xml命名空间中混乱。以下应工作(的RichFaces 4.5.x):

<!DOCTYPE html> 
<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
       xmlns:h="http://java.sun.com/jsf/html" 
       xmlns:rich="http://richfaces.org/rich" 
       xmlns:ui="http://java.sun.com/jsf/facelets"> 

    <h:body id="staffBody"> 
     <h:form id="pfform" > 
      <h:panelGrid> 
       <rich:tabPanel switchType="ajax"> 
        <rich:tab name="First"> 
         Here is tab #1 
        </rich:tab> 
        <rich:tab name="Second"> 
         Here is tab #2 
        </rich:tab> 
        <rich:tab name="Third"> 
         Here is tab #3 
        </rich:tab> 
       </rich:tabPanel> 
      </h:panelGrid> 
     </h:form> 
    </h:body> 
</ui:composition> 
+0

在我的情况下,它是在类路径中的jar依赖关系的遗漏是否富组件未转换为html ... –