2 Replies Latest reply on Apr 23, 2009 6:59 AM by Alain Raynaud

    ui:repeat, datatable and selectOneMenu

    Simon Bailey Newbie


      i'm creating multiple dataTables in a JSF page, and have a list of <h:selectOneMenu/>s in each <rich:dataTable/>. on submit however, the converter is only called for the <h:selectOneMenu/>s in the last <rich:dataTable/>.

      this is the relevant code in my jsf page:

      <ui:repeat value="#{timetable.lectures}" var="lva">
        <rich:panel styleClass="outerGrid">
          <f:facet name="header">#{timetable.lectureInfo[timetable.lectures.indexOf(lva)].title}</f:facet>
            <rich:panel rendered="#{not empty timetable.practicals[timetable.lectures.indexOf(lva)]}">
              <f:facet name="header">&#220;bungen/Seminare</f:facet>
              <h:dataTable var="mscPr"
                rowClasses="evenRow, oddRow">
                <h:column>#{mscPr.title} (#{mscPr.type})</h:column>
                  <h:selectOneMenu value="#{mscPr.selected}"
                    converter="titConverter" styleClass="dataRowSelect">
                    <s:selectItems value="#{mscPr.times}" var="n"
                      noSelectionLabel="No Selection..." />
          <h:commandButton styleClass="button" value="Generate!"
            action="#{timetable.showPdf}" />

      the <rich:dataTable/> shows all the correct data, but the  converter is only called for the LAST <rich:dataTable/> on the page. if i recreate the page using distinct lists for all the <rich:dataTable/>s rather than an array of lists, the page works as it should. also, if there is only ONE <rich:dataTable/>, the page also works.

      software versions: Seam 2.0.1GA, RichFaces 3.2.0, JBoss 4.2.0GA

      any ideas? this has been stumping me for about a day now... :/

      thanks in advance,