当我尝试使用primefaces扩展页时收到以下错误。
javax.portlet.faces.BridgeException: javax.faces.FacesException: /view/customer/notes.xhtml @151,47 <pe:sheet> Tag Library supports namespace: http://primefaces.org/ui/extensions, but no tag was defined for name: sheet
这是代码
<f:view locale="#{facesContext.externalContext.requestLocale}"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:portlet="http://java.sun.com/portlet_2_0"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:pe="http://primefaces.org/ui/extensions">
<pe:sheet id="sheet" value="#{treeBean.content}" var="tree"
height="400" showRowHeaders="true" width="700" stretchH="all"
movableCols="false" movableRows="false">
<p:ajax event="cellSelect" listener="#{treeBean.onCellEdit}" />
<f:facet name="header">
<h:outputText value="Notes" />
</f:facet>
<pe:sheetcolumn headerText="Comment Type" readonly="true" value="#{tree.commentType}" colWidth="150" />
<pe:sheetcolumn headerText="MTCNs" readonly="true" value="#{tree.mtcns}" colWidth="150" />
<pe:sheetcolumn headerText="Call Type" readonly="true" value="#{tree.callType}" colWidth="150" />
<pe:sheetcolumn headerText="Phone" readonly="true" value="#{tree.phone}" colWidth="150" />
<pe:sheetcolumn headerText="Dispute Reason" readonly="true" value="#{tree.disputeReason}" colWidth="150" />
<pe:sheetcolumn headerText="Placement Decision" readonly="true" value="#{tree.placementDescision}" colWidth="150" />
</pe:sheet>
我正在尝试使用cellSelect事件捕获单元格值,但在运行时遇到此错误。使用primeface-4.0
答案 0 :(得分:2)
正确的答案是使用PrimeFaces Extensions 6.2或更高版本,这是Sheet组件引入的版本。