1 Reply Latest reply on May 31, 2008 7:16 AM by nbelaevski

    Problems with combining ui:repeat and rich:dropdownmenu?

    blumenro

      All,

      I'd like to build a dynamic dropdownmenu. I have a list of entries and wanted to use the ui:repeat tag to loop through them. However when I do this:

      <ui:composition
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
       <h:form>
       <rich:toolBar>
      
       <ui:repeat value="#{navigationHome.topNavigation.sortedChildren}" var="_navigation">
       <rich:dropDownMenu>
       <f:facet name="label">
       <h:outputText value="#{_navigation.title}" />
       </f:facet>
      
       <ui:repeat value="#{_navigation.sortedChildren}" var="_navChild">
       <rich:menuItem submitMode="none">
       <h:outputLink value="#{_navChild.url}">
       <h:outputText value="#{_navChild.title}"></h:outputText>
       </h:outputLink>
       </rich:menuItem>
       </ui:repeat>
      
      
       </rich:dropDownMenu>
      
       </ui:repeat>
      
       </rich:toolBar>
       </h:form>
      
      </ui:composition>


      I get the elements of the main list rendered below each other. Additionally the menu with the children of each of these elements does not open. There is only a white dot appearing. I confirmed already that the list of children is not empty.

      Any hints how I can get this to work?

      Regards,
      Christian