primefaces标签<;p:侧边栏>;错误

primefaces标签<;p:侧边栏>;错误,primefaces,jsf-2,sidebar,Primefaces,Jsf 2,Sidebar,我正在创建JSFWeb应用程序,试图在其中运行primefaces官方网站提供的p:sidebar代码,但我遇到了错误 标记库支持命名空间:http://primefaces.org/ui,但没有为name:sidebar定义标记 我正在使用primefaces 6.0 我正在尝试运行的代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht

我正在创建JSFWeb应用程序,试图在其中运行primefaces官方网站提供的p:sidebar代码,但我遇到了错误

标记库支持命名空间:
http://primefaces.org/ui
,但没有为name:sidebar定义标记

我正在使用primefaces 6.0

我正在尝试运行的代码

<!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:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
      >

<h:head>
    <title>carouselExample</title>
</h:head>
<h:body>

<p:sidebar widgetVar="sidebar1" baseZIndex="10000">
    <h1 style="font-weight:normal">Left Sidebar</h1>
    <p:commandButton value="Cancel" oncomplete="PF('sidebar1').hide()"/>
</p:sidebar>

<p:sidebar widgetVar="sidebar2" position="right" baseZIndex="10000">
    <h1 style="font-weight:normal">Right Sidebar</h1>
    <p:commandButton value="Cancel" oncomplete="PF('sidebar2').hide()"/>
</p:sidebar>

<p:sidebar widgetVar="sidebar3" position="top" baseZIndex="10000">
    <h1 style="font-weight:normal">Top Sidebar</h1>
    <p:commandButton value="Cancel" oncomplete="PF('sidebar3').hide()"/>
</p:sidebar>

<p:sidebar widgetVar="sidebar4" position="bottom" baseZIndex="10000">
    <h1 style="font-weight:normal">Bottom Sidebar</h1>
    <p:commandButton value="Cancel" oncomplete="PF('sidebar4').hide()"/>
</p:sidebar>

<p:sidebar widgetVar="sidebar5" fullScreen="true" baseZIndex="10000">
    <h1 style="font-weight:normal">Full Screen Sidebar</h1>
    <p:commandButton value="Cancel" oncomplete="PF('sidebar5').hide()"/>
</p:sidebar>

<p:commandButton icon="fa fa-arrow-right" oncomplete="PF('sidebar1').show()" />
<p:commandButton icon="fa fa-arrow-left" oncomplete="PF('sidebar2').show()" />
<p:commandButton icon="fa fa-arrow-down" oncomplete="PF('sidebar3').show()" />
<p:commandButton icon="fa fa-arrow-up" oncomplete="PF('sidebar4').show()" />
<p:commandButton icon="fa fa-arrows-alt" oncomplete="PF('sidebar5').show()" />

</h:body>

</html>

旋转样品
左侧边栏
右侧边栏
顶部边栏
底部边栏
全屏侧边栏

侧边栏目前仅在elite版本(6.1.7和6.0.25)或即将发布的6.2版本中可用,该版本尚未发布。

如发布说明、检查githib问题等所示