7 Replies Latest reply on Feb 11, 2011 8:53 PM by Kiran Kumar

    rich:dataTable onRowDblClick

    Kiran Kumar Newbie

      Need help in implementing the following scenario.



      <rich:dataTable rows="10" value="#{bean.resultList}" var="_result" width="100%" style="width:100%;"

                                      onRowDblClick="openDetail('#{_result.Id}');" >


      I have a Search and Results screen and on double click of a column I want to open the details in a ModalPanel. As shown above the dataTable is pointing to a "searchResultList" in the bean. On double click of the row I want to retreive the object of the selected row and process the data in it.



      How do I acheive(access the selected object) this without iterating the complete list(checking for the id passed) ? (I can do by storing the complete list in a map by Id, but I'm looking for a better approach than this please).



      I have a checkbox in each row of the dataTable, how can I access the selected row Ids in the bean when the bean method is invoked on click of  button ?


      Please note search is on an external service and is not from database and my bean is a POJO in Session scope.


      Thanks In Advance.