首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >当在a4j:repeat或ui:repeat中使用时,rich:panelBarItem不显示其内容

当在a4j:repeat或ui:repeat中使用时,rich:panelBarItem不显示其内容
EN

Stack Overflow用户
提问于 2016-03-14 14:06:48
回答 1查看 71关注 0票数 1
代码语言:javascript
运行
复制
<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一起使用吗?

EN

回答 1

Stack Overflow用户

发布于 2016-03-16 20:54:06

你可以使用c:forEach标签来代替ui:repeat。那么rich:panelBarItem就可以正常工作了。

代码语言:javascript
运行
复制
<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>

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35980555

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档