4 Replies Latest reply on Sep 28, 2007 11:36 AM by jcelano

    dropDownMenu

    g00se24

      Hello,
      I would like to build my menu dynamically. It's necessary for me to implement a workspace switcher (seam component) by using a dropdownmenu.

      I tried it with:

      <rich:dropDownMenu value="Start">
      <rich:menuGroup value="Workspaces">
      <ui:repeat value="#{conversationList} var="list">
      <rich:menuItem>
      #{list.description}
      </rich:menuItem>
      </ui:repeat>
      </rich:menuGroup>
      </rich:dropDownMenu>
      


      But their is nothing displayed, since I know their is more than one workspace open...
      Does anybody have an idea?

        • 1. Re: dropDownMenu
          ilya_shaikovsky

          Why you can't use just binding to build menu from the model?

          • 2. Re: dropDownMenu
            g00se24

            Since I'm using a default seam component, I wouldn't like to build a wrapper component...
            That's why i'm not using a binding.
            I've just found a nice thing:

             <rich:menuGroup value="Workspaces" disabled="#{empty conversationList}">
            <rich:menuItem>
             <ui:repeat value="#{conversationList}" var="item">
             <rich:menuItem submitMode="none">
             #{item.description}
             </rich:menuItem>
             </ui:repeat>
            </rich:menuItem>
             </rich:menuGroup>
            

            works, but does not show a nice menu ;)...

            • 3. Re: dropDownMenu
              jcelano

              did you ever get an answer to this question? I am trying to do something similiar and was wondering if it was possible....or maybe i am missing something obvious and there is a better way to do it. Any advice would be great.

              thx

              Joe C

              • 4. Re: dropDownMenu
                jcelano

                i have found one way to get this to work based on teh article at http://jboss.com/index.html?module=bb&op=viewtopic&t=108612

                you can use the c:forEach tag and iterate that way.