I am not able to render the breadcrumb control of primefaces. I am dynamically building the breadcrumb using ui:repeat. The moment I wrapped it inside the p:breadCrumb tag , I am not able to see the control on the page
Following code I am using in my .xhtml
<p:breadCrumb>
<ui:repeat value="#{conversationScope.trail}" var="bcrumb">
<h:outputLink value="#{bcrumb.url}">
<h:outputText value="#{bcrumb.label}" />
<h:outputText value=">" />
</h:outputLink>
<p:menuitem value="#{bcrumb.label}" url="#{bcrumb.url}" />
</ui:repeat>
</p:breadCrumb>
Please suggest is there any alternative?
To build a
<p:breadCrumb>menu in PrimeFaces dynamically you’ll want to use a MenuModel object in your bean for the breadCrumb component to render. Loop through your trail list creating MenuItems and add them the MenuModel object.In your .xhtml
Bean to add menu items to the breadcrumb menu.