我想使用模型文件渲染嵌套的2级导航。导航可以改变。
有一个Simple Bean NavigationItem,它包含标题,目标,图标和可能的子项列表。
导航创建非常简单:
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:b="http://butterfaces.org/components" >
<ul id="side-nav" class="main-menu navbar-collapse collapse">
<b:repeat value="#{navigation.values}" var="nav" rendered="true">
<li class="#{nav.hasSubItems()==false ? '' : 'has-sub'}">
<h:link outcome="#{nav.target}">
<i class="#{nav.icon}"></i>
<span class="title">#{nav.title}</span>
</h:link>
<ui:fragment rendered="#{nav.hasSubItems()}">
<ul class="nav collapse">
<b:repeat value="#{nav.subItems}" var="subNav" rendered="true">
<li>
<h:link outcome="#{subNav.target}">
<span class="title">#{subNav.title}</span>
</h:link>
</li>
</b:repeat>
</ul>
</ui:fragment>
</li>
</b:repeat>
</ul>
</ui:composition>
这是我的JSF
/Users/kunal/Documents/Node/Project/taskAccomplisher/node_modules/mongodb/lib/server.js:242
process.nextTick(function() { throw err; })
^
MongoError: server 127.0.0.1:27017 received an error {"name":"MongoError","message":"write EPIPE"}
at null.<anonymous> (/Users/kunal/Documents/Node/Project/taskAccomplisher/node_modules/mongodb-core/lib/topologies/server.js:213:40)
at g (events.js:260:16)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at null.<anonymous> (/Users/kunal/Documents/Node/Project/taskAccomplisher/node_modules/mongodb-core/lib/connection/pool.js:119:12)
at g (events.js:260:16)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at Socket.<anonymous> (/Users/kunal/Documents/Node/Project/taskAccomplisher/node_modules/mongodb-core/lib/connection/connection.js:151:49)
at Socket.g (events.js:260:16)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at onwriteError (_stream_writable.js:304:10)
at onwrite (_stream_writable.js:322:5)
at WritableState.onwrite (_stream_writable.js:89:5)
at fireErrorCallbacks (net.js:442:13)
我的预期结果:
我的实际结果是:
我有什么想念或错吗? 我在Tomcat 8上使用Mojarra 2.2.8
答案 0 :(得分:0)
mojarra repeat组件存在一些严重问题,因此我们在butterfaces中创建了自己的组件(如primefaces,richfaces等)。
这似乎是一个错误,我创建了一个问题:https://github.com/ButterFaces/ButterFaces/issues/63