2 Replies Latest reply on Jan 5, 2011 4:27 AM by Ilya Sorokoumov

    View row-specific data by clicking on a row in a datatable

    Dhivya S.T Newbie

      Hi,

       

      I have a page displaying a datatable. On selecting a row on that datatable i need to navigate to another screen where i populate the row-specific data in a form. How do i achieve this? In my datatable i have a a4j support tag like below

       

      <rich:dataTable value="#{existingDealsBean.dealList}"

       

      binding="#{existingDealsBean.dataTable}" var="deal" id="dealTable"

       

      rowKeyVar="rowIndex" reRender="datascroller"

       

      rowClasses="rowOdd, rowEven" width= "100%">

       

      <a4j:support event="onRowClick" action="#{existingDealsBean.rowSelected}"/>

       

      Using an actionListener here will help me get the ActionEvent using which i can get the selected row.

      So can i use both action and actionListener here, action to navigate to the page and actionListener to get the rowdata, set the values in backing bean and set the bean in the request?

       

      Please help me out