0 Replies Latest reply on May 19, 2008 1:50 PM by jbossja

    Problem with dataTable inside dataList

    jbossja

      Hi,


      I have a dataList with a list of results, and for each result I have another list of child objects which I display in a dataTable.
      The child objects can each be edited and then the page submitted.


      The rendering of the lists is fine, the problem is that when I submit the page, the data binding does not seem to work as I can see that the values entered for the objects are all null.


      Here are excerpts from my code:



      <h:form>
      <t:dataList value="#{overviewBean.otherResults}"
                                              var="results"
                                              layout="simple">
      
          <div class="resultsDiv">
              <t:outputResults value="#{results}"/> 
                     
                  <h:dataTable value="#{results.questionsForFollowUp}" var="progress"
      rendered = "#{results.displayProperties.followUpAvailabland results.questionsForFollowUpSize > 0}"
                              border="1">
                              
                         <h:column>
                              #{progress.question.questionText}
                         </h:column>
      
                          <h:column>                                                            
                              <t:div rendered="#{progress.deadlineSet}">
                                      <h:outputText value="#{progress.deadline}">                                                      <f:convertDateTime type="date" locale="#{msg.locale}"                                                     timeZone="#{msg.timeZone}" pattern="#{msg.datePattern}"/>                                                                                                               
                                     </h:outputText>
                              </t:div>  
                                                                              
                              <t:div rendered="#{!progress.deadlineSet}">                                               
                                      <t:inputCalendar  value="#{progress.deadline}" renderPopupButtonAsImage="true"                                                         renderAsPopup="true" popupTodayString="Today is"                                                                   popupWeekString="Wk" monthYearRowClass="warning"                     weekRowClass="warning" currentDayCellClass="warning"                                                           rendered="#{progress.action.deadlineRequired}">
                                                                                             <f:convertDateTime type="date" locale="#{msg.locale}"                                                                                   timeZone="#{msg.timeZone}" pattern="#{msg.datePattern}"/>                                       
                                                                                       </t:inputCalendar>
                    </t:div>                                                                                     </h:column>
                         
      
            </h:dataTable>
          </div>
      </t:dataList>
      
      <h:commandButton value="Save" action="#{overviewBean.saveQuestionProgress}"/>
      </h:form>




      My save method in my backing bean is as follows:


      public void saveQuestionProgress()
              {                               
                      for(OtherResultView view : otherResults)
                      {                       
                              for(Questionprogress progress : view.getQuestionsForFollowUp())
                              {                               
                                      log.debug(" action = "+progress.getAction().getActionName());
                                      log.debug("saving progress with deadline = " + progress.getDeadline());                 
                                      questionProgressDAO.mergeQuestionProgressForFollowUp(progress);
                              }
                      }
                      
              }





      Can anyone please provide some help on this issue?


      Thanks.