2 Replies Latest reply on Jul 24, 2007 6:29 AM by asaf sh

    Multiple row selection

    asaf sh Expert

      Hey,

      I have created a CRUD actions for a specific entity via Seam-Gen which seems to be nice and clean using EntityHome/EntityQuery,

      I would like to add to the generated list another column that has a boolean jsf tag in order to support multiple row selection,


      I thought about adding a map to the EntityQuery seam component such as:

      Map<MyEntity, Boolean> rowSelection;
      


      and in my facelets code (per row):
      datatable...
      <column>
      <h:selectBooleanCheckbox value="#{myEntityList.rowSelection[myVarOfDataTable]}" />
      </column>
      



      I was wondering if there's a better way to pass the selected rows to an java action since this way is a little bit annoying due to the fact that -all- rows are passed but only the selected entities are equal to true,
      so iteration + if conditions is required, etc...



      Thanks,

      Asaf.