2 Replies Latest reply on Aug 13, 2007 1:19 PM by Tim

    How to generate dynamic menuItem with Seam list

    Tim Newbie

      I try to dynamically generate this drop down on the top menu but it didnot show any item from product list.

       <rich:dropDownMenu value="Policy" disabled="#{empty productList.resultList}">
       <ui:repeat value="#{productList.resultList}" var="product">
       <rich:menuGroup value="#{product.name}" submitMode="ajax">
       <h:dataTable value="#{product.states}" var="state">
       <h:column>
       <rich:menuItem submitMode="ajax">
       policy/#{product.name}/#{state}/ApplicationEdit.xhtml
       </rich:menuItem>
       </h:column>
       </h:dataTable>
       </rich:menuGroup>
       </ui:repeat>
       </rich:dropDownMenu>
      


      This one shows me no item in the menu.
      The following complains with exception
       <rich:dataTable id="productList"
       var="product"
       value="#{productList.resultList}"
       rendered="#{not empty productList.resultList}">
       <h:column>
       <rich:menuGroup value="#{product.name}">
       <h:dataTable value="#{product.states}" var="state">
       <h:column>
       <rich:menuItem action="/policy/#{product.name}/#{state}/ApplicationEdit.xhtml" value="#{state}"/>
       </h:column>
       </h:dataTable>
       </rich:menuGroup>
       </h:column>
       </rich:dataTable>
      


      It complains about the action with JSF code /policy/#{product.name}/#{state}/ApplicationEdit.xhtml

      What's the problem there?