简体   繁体   English

JSF Primefaces菜单引导样式

[英]JSF Primefaces Menu Bootstrap Style

How to apply Bootstrap menu style in Primefaces <p:menubar> 如何在Primefaces中应用Bootstrap菜单样式<p:menubar>

<p:layout fullPage="true" style="border:0px;">
        <p:layoutUnit position="north" size="55"  resizable="true" closable="false" collapsible="true" gutter="0" class="no-border border-bottom ui-menubar">
            <h:form id="frmtheme"> 
                <p:growl id="messages" showDetail="true" />  
                <p:menubar  model="#{menuBean.menubar}"
                    <f:facet name="options" >
                        <h:commandLink action="#{loginBean.doLogout}" value="Log out" class="btn btn-danger logout">
                            <i class="glyphicon glyphicon-log-out"/>
                        </h:commandLink>

                    </f:facet>
                </p:menubar>
            </h:form>
        </p:layoutUnit>
      </p:layout>

As per Bootstrap Navbar , it requires container div s and <ul> <li> thingies. 按照Bootstrap Navbar的要求,它需要容器div<ul> <li>东西。 How can I apply Bootstrap classes here? 如何在这里应用Bootstrap类?

Probably it's a good idea to abandon PrimeFaces support with the menu. 最好放弃菜单中的PrimeFaces支持。 One of my recent projects used PrimeFaces. 我最近的项目之一是使用PrimeFaces。 But at the same time, they preferred to use the Bootstrap navbar natively. 但是同时,他们更喜欢本机使用Bootstrap导航栏。 That approach worked great. 这种方法效果很好。

Other than that, I agree with Jasper: BootsFaces is the way to go! 除此之外,我同意Jasper的看法:BootsFaces是必经之路! But I'm a committer to BootsFaces, so I may be biased. 但是我是BootsFaces的提交者,所以我可能会有所偏见。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM