【问题标题】:primefaces tag <p:sidebar> errorprimefaces 标签 <p:sidebar> 错误
【发布时间】:2017-10-27 05:26:41
【问题描述】:

我正在创建 JSF Web 应用程序,我试图在其中运行 primefaces 官方网站提供的 p:sidebar 代码,但出现错误。

&lt;p:sidebar&gt; 标签库支持命名空间:http://primefaces.org/ui,但没有为名称定义标签:侧边栏

我正在使用 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>

【问题讨论】:

    标签: primefaces jsf-2 sidebar


    【解决方案1】:

    侧边栏目前仅在精英版本(6.1.7 和 6.0.25)或即将发布的 6.2 中可用。

    【讨论】:

    • 在发布说明之后可以看到,检查 githib 问题等
    猜你喜欢
    • 1970-01-01
    • 2012-07-19
    • 2019-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-13
    • 2012-12-08
    相关资源
    最近更新 更多