0 Replies Latest reply on May 7, 2012 7:47 AM by Aitor González

    Multiple dynamic selectOneMenu inside ui:repeat

    Aitor González Newbie

      Hi.

       

      Is there a possibility to generate dynamic selectOneMenu inside an ui:repeat tag, and bind each selected value to a list?

       

      What is the best approach to doing this with Seam?

       

       

       

      {code:xml}

       

      <ui:repeat value="#{myBean.suitableAlgorithms" var="_alg">

      <s:decorate>

           <h:outputLabel value="#{_alg.name}">

            <ui:repeat value="#{_alg.algorithmAttributes}" var="_algAtt">

                <h:outPutLabel value="#{_algAtt.name}">

                <h:selectOneMenu value="#{myBean.selectedAlgAttribute[index?]}">

                     <s:selectItems value="#{_algAtt.algorithmAttributeValues}" var="_algAttVal" label="#{_algAttVal.value}/>

                      <s:convertEntity/>         

           </ui:repeat>

      </s:decorate>

      </ui:repeat>

       

       

      {code}

       

      I dont know how to get index value (and even if it's possible).

       

      It would be great if I could use my entityBean set collections to bind selectOneMenu values but I think it's imposible.

       

       

      Any hint will be appreciated!

       

      Thank you in advance