2017-10-27 13 views
0

私はprimefaces公式サイトのp:サイドバーコードを実行しようとしているJSF Webアプリケーションを作成していますが、エラーが発生しています。primefacesタグ<p:sidebar>エラー

<p:sidebar>タグライブラリは、名前空間をサポート:http://primefaces.org/ui、ないタグは名前のために定義されていない:サイドバー

私はprimefaces 6.0

enter image description here

にコードを使用しています私は

を実行しようとしています
<!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> 

答えて

2

現在、サイドバーは、エリートリリース(6.1.7および6.0.25)または今後リリースされる6.2(まだリリースされていない)でのみ利用できます。

+0

あなたはありがとうございました – Irum

+0

releasenotesに続いて見ることができるように、githibの問題をチェックするなど – Kukeltje