0 Replies Latest reply on Sep 29, 2009 11:44 AM by David Jitendranath

    updating multiple records in rich:dataTable

    David Jitendranath Novice

      I have a rich:dataTable which displays some records from a table called 'gradetoskill'. This table has grades from 0-15 and skill levels of 1,2 &3.
      With seam I have generated the default list page which shows the records in the dataTable. I have modified the 'skill' column to display a dropdown with the 3 values. The default edit of Seam updates one record at a time but I want to give the user the ability to click on an edit button at the top of the table and edit multiple records by letting the user select the 'skill level' from the dropdown and clicking save.
      Can anyone tell me how I can accomplish this?
      Am I on the right track if I try using the <a4j:repeat> tag??
      When I use that tag I get a argument mismatch exception for the binding attribute. can someone point me to an example or kinda give me some snippet of code on how I can use this?

      Here's the code I have.

      <a4j:repeat id = "repeater" value = "#{gradeToLevelListEdit.resultList}" var = "_gradeToLevel" binding="#{gradeToLevelListEdit}">
       <rich:dataTable id="gradeToLevelListEdit"
       var="_gradeToLevel"
       value="#{gradeToLevelListEdit.resultList}"
       rendered="#{not empty gradeToLevelListEdit.resultList}">
       <h:column>
       <f:facet name="header">
       <ui:include src="layout/sort.xhtml">
       <ui:param name="entityList" value="#{gradeToLevelListEdit}"/>
       <ui:param name="propertyLabel" value="Grade"/>
       <ui:param name="propertyPath" value="gradeToLevel.grade"/>
       </ui:include>
       </f:facet>
       <h:outputText value="#{_gradeToLevel.grade}"/>
       </h:column>
       <h:column>
       <f:facet name="header">
       <ui:include src="layout/sort.xhtml">
       <ui:param name="entityList" value="#{gradeToLevelListEdit}"/>
       <ui:param name="propertyLabel" value="Skill Level"/>
       <ui:param name="propertyPath" value="gradeToLevel.misSkillLevel"/>
       </ui:include>
       </f:facet>
       <rich:comboBox id="misSkillLevel" required="true"
       value="#{_gradeToLevel.misSkillLevel}">
       <f:selectItem itemValue="1"/>
       <f:selectItem itemValue="2"/>
       <f:selectItem itemValue="3"/>
       </rich:comboBox>
       </h:column>
       </rich:dataTable>
       </a4j:repeat>