1 Reply Latest reply on Oct 12, 2011 1:38 AM by Galo Coloma

    current row/data on rowclick  for rich:datatable

    Sascha Janz Master

      sorry for asking a simple stupid question...but i can't find the answer anywhere

      i got a simple rich:datatable on my page

      how can i get the data of the current row clicked?

       <rich:dataTable value="#{SessionBean.docs}" var="doc"
       onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0" width="700" border="0" columns="3"
       columnsWidth="10%,10%,80%" style="width:100%">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column colspan="1">
       <h:outputText value="Datum" />
       </rich:column>
       <rich:column colspan="1">
       <h:outputText value="Benutzer" />
       </rich:column>
       <rich:column colspan="1">
       <h:outputText value="Datei" />
       </rich:column>
       </rich:columnGroup>
      
       </f:facet>
       <rich:columnGroup>
       <rich:column colspan="1">
       <h:outputText value="#{doc.date}" />
       </rich:column>
       <rich:column colspan="1">
       <h:outputText value="#{doc.user}" />
       </rich:column>
       <rich:column colspan="1">
       <h:outputLink value="#{doc.link}">
       <h:outputText value="#{doc.name}" />
       </h:outputLink>
       </rich:column>
       </rich:columnGroup>
      
       </rich:dataTable>