<rich:tabPanel switchType="client">
<rich:tab label="Display">
<h:form id="displayForm">
<rich:panelBar height="400" width="500" id="displayPanel" >
<ui:repeat value="#{backingBean.myMap}" var="item">
<rich:panelBarItem label="#{item.key.name}">
Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only give you access to the managed bean facility, Ajax4jsf advantages the action and value change listeners as well as invokes server-side validators and converters during the AJAX request-response cycle.
</rich:panelBarItem>
</ui:repeat>
</rich:panelBar>
</h:form>
</rich:tab>
</rich:tabPanel>嗨,使用上面的代码我想要显示多个panelBarItems(数字取决于数据库中存在的Name值的数目)。我可以在UI中查看panelBarItems,但问题出在内容内部(Ajax4jsf是..)不可见,当单击其他panelBarItems时,它不会展开。我们可以将ui:repeat或a4j:repeat与rich:panelBarItem一起使用吗?
发布于 2016-03-16 20:54:06
你可以使用c:forEach标签来代替ui:repeat。那么rich:panelBarItem就可以正常工作了。
<rich:tabPanel switchType="client">
<rich:tab label="Display">
<h:form id="displayForm">
<rich:panelBar height="400" width="500" id="displayPanel" >
<c:forEach value="#{backingBean.myMap}" var="item">
<rich:panelBarItem label="#{item.key.name}">
Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only give you access to the managed bean facility, Ajax4jsf advantages the action and value change listeners as well as invokes server-side validators and converters during the AJAX request-response cycle.
</rich:panelBarItem>
</c:forEach>
</rich:panelBar>
</h:form>
</rich:tab>
https://stackoverflow.com/questions/35980555
复制相似问题