简体   繁体   中英

ui:repeat inside composition not printing values

I am new to jsf. I have the bellow code. When I place ui:repeat inside rich:toolbar it prints the data. But when I place it after the toolbargroup inside composition tag it doesn't print anything. I have a toolbar and I want to show ui:repeat data bellow that toolbar. If I place it in toolbar it shows the data but inside the toolbar not bellow it. How can I place it bellow the toolbar?

Thanks.

Update: I found out the problem. The ui:repeat tag is showing up bellow the toolbar. So how can I add position to ui:repeat?

enter code here<h:body>
    <ui:composition>    <h:panelGroup layout="block">
            <a4j:region>
                <rich:toolbar id="header-toolbar" height="30px" itemSeparator="line">
                    <rich:toolbarGroup location="right" rendered="#{not empty searchType}">
                        <rich:menuItem 
                            label="search"
                            mode="ajax"
                            execute="@this"
                            oncomplete="#{rich:component(searchFormModalPanel)}.show();"
                            status="status"/>
                    </rich:toolbarGroup>   </rich:toolbarGroup>

                </rich:toolbar>   
            </a4j:region>   //Bellow doesn't show up!   <ui:repeat value="#{breadCrumbMB.crumbs}" var="crumb" varStatus="crumStatus">
                    #{breadCrumbMB.incIndex()}
                    <h:outputLink value="#{crumb}">
                        <h:outputText value="#{breadCrumbMB.title(crumb.toString())}" rendered="${breadCrumbMB.lastLink()=='false'}"/></h:outputLink> >
                    <h:outputText value="#{breadCrumbMB.title(crumb.toString())}" rendered="${breadCrumbMB.lastLink()=='true'}"/> 
                    </ui:repeat>  </ui:composition>
</h:body>

尝试将ui:repeat包含在a4j:region中,如果它不起作用,请使用a4j:repeat

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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