<?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>
....结果是:
这是标签#1这是标签#2这是标签#3
全部在一行中,所以它没有正确地呈现它。
知道吗?
谢谢
发布于 2016-04-15 22:40:23
解决办法是:
将jar依赖项添加到类路径(webapp/lib)中,没有它,富组件就不会转换为html。
发布于 2016-03-03 12:49:54
可能会在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>https://stackoverflow.com/questions/33510255
复制相似问题