5 Replies Latest reply on Nov 25, 2008 4:32 AM by ptr83

    rich:panelMenu and c:forEach problem

    mihal

      Hi,

      I trying to use rich:panelMenu and generate it dynamically. The bit of code is below:

      <h:form id="userMainMenu">
      <h:panelGrid columns="2">
      <rich:panelMenu width="200px" mode="ajax"
      iconExpandedGroup="disc" iconCollapsedGroup="disc"
      iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
      iconCollapsedTopGroup="chevronDown">
      <c:forEach items="#{currentInfoBean.menu}" var="item">
      <rich:panelMenuGroup label="#{item.title}">
      <c:forEach items="#{item.items}" var="itemChild">
      <rich:panelMenuItem label="#{itemChild.title}" action="#{itemChild.actionURL}"/>
      </c:forEach>
      </rich:panelMenuGroup>
      </c:forEach>
      </rich:panelMenu>
      </h:panelGrid>
      </h:form>

      That's doesn't work. Can I use c:forEach here? If not - what a workaround is possible, how to iterate items and fill in the menu?

      I use JBoss 4.2.2 and RichFaces 3.2.2.GA

      Please help.