使用primefaces扩展表时出错: - 但没有为name:sheet定义标记

问题描述 投票:1回答:1

当我尝试使用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

jsf primefaces-extensions
1个回答
2
投票

对此的正确答案是使用PrimeFaces Extensions 6.2或更高版本,这是引入Sheet组件的版本。

© www.soinside.com 2019 - 2024. All rights reserved.