2 Replies Latest reply on Sep 16, 2008 5:38 PM by Michal Kuna

    populating clickable datatable by data comming from OneToMany relationship?

    Michal Kuna Newbie

      Hello,


      Is it possible to make a clickable datatable populated by data comming from OneToMany relationship?


      <a4j:form>
           <rich:dataTable value="#{person.cars.toArray()}" var="car">
      
                <rich:columnGroup>
                     <rich:column>
                          #{car.id}
                     </rich:column>
                     <rich:column>
                          <a4j:commandLink value="remove" action="#{somebean.removeCar(car)}" />
                     </rich:column>
                </rich:columnGroup>
              </rich:dataTable>
      </a4j:form>
      
      



      I know it will work if i populate the datatable with data comming from a Factory method, but this kind of solution I dont find optimal ;) So the question is:



      Is it possible to make a clickable datatable populated by data comming from OneToMany relationship?