4 Replies Latest reply on Nov 15, 2007 5:04 PM by jippeh

    ui:repeat inside rich:dropDownMenu?

    jippeh

      Is it possible to use a ui:repeat inside a rich:dorpDownMenu to dynamically generate rich:menuitem components? The following code illustrates what I'm trying to do:

      <rich:dropDownMenu value="Blogs">
      <ui:repeat var="b25" value="#{home.config.blogsList}">
      <rich:menuItem submitMode="none">
      <h:outputLink value="/blog/#{b25.id}">
      <h:outputText value="#{b25.name}"/>
      </h:outputLink>
      </rich:menuItem>
      </ui:repeat>
      </rich:dropDownMenu>

      The rich:menuitems are not generated.

        • 1. Re: ui:repeat inside rich:dropDownMenu?
          ilya_shaikovsky

          c:forEach should be used instead of ui:repeat

          • 2. Re: ui:repeat inside rich:dropDownMenu?
            jippeh

             

            "ilya_shaikovsky" wrote:
            c:forEach should be used instead of ui:repeat


            Unfortunately that will not suffice. c:ForEach is a taghandler an is only used to build the JSF tree. It is not a component and will therefore not end up in the JSF tree. So, if I add a menuitem runtime, it will not be rendered.

            • 3. Re: ui:repeat inside rich:dropDownMenu?

               

              "jippeh" wrote:

              Unfortunately that will not suffice. c:ForEach is a taghandler an is only used to build the JSF tree. It is not a component and will therefore not end up in the JSF tree. So, if I add a menuitem runtime, it will not be rendered.


              I wonder, if you understand it, why you are asking about what must be obvious for you.

              • 4. Re: ui:repeat inside rich:dropDownMenu?
                jippeh

                 

                "SergeySmirnov" wrote:
                "jippeh" wrote:

                Unfortunately that will not suffice. c:ForEach is a taghandler an is only used to build the JSF tree. It is not a component and will therefore not end up in the JSF tree. So, if I add a menuitem runtime, it will not be rendered.


                I wonder, if you understand it, why you are asking about what must be obvious for you.


                I was hoping I did not understand it completely and was missing something. But I guess that't not the case.