3 Replies Latest reply on Jul 18, 2007 12:52 PM by richfacesuser richfacesuser

    onRowClick in rich:datatable

    Tom Barry Newbie

      I'm trying to add <a:support> to a rich:datatable to handle selecting rows. I've looked at the examples posted in this forum, but am running into a problem.

      If I have the following:

       <rich:dataTable id="taskVersions" value="#{taskAdmin.taskVersions}" var="tv" onRowClick="handleRowClick()">
       <f:facet name="header">
       <h:outputText value="Versions"/>
       <a:support event="onRowClick" actionListener="#{taskAdmin.versionSelected}"/>
       <f:facet name="header">Version</f:facet>
       <h:outputText value="#{tv.taskVersion.name}"/>
       <f:facet name="header">Description</f:facet>
       <h:outputText value="#{tv.description}"/>
       <f:facet name="header">Configuration</f:facet>
       <h:outputText value="#{tv.taskConfiguration.configurationVersion}"/>
       <f:facet name="header">Created By</f:facet>
       <h:outputText value="#{tv.creator.fullName}"/>
       <f:facet name="header">Created On</f:facet>
       <h:outputText value="#{tv.createDate}">
       <f:convertDateTime pattern="MM/dd/yyyy hh:mm a" timeZone="#{userTimeZone}"/>

      my actionListener isn't called. When I remove the onRowClick() from the <rich:datatable> element, the action listener is called. I thought maybe a javascript runtime error was happening with my handleRowClick() function, but that doesn't seem to be the case.

      I need the <rich:datatable onRowClick=""> attribute defined so that I can highlight the selected row. Other examples in this forum have onRowClick in both the <rich:datatable> and <a:support>.

      Any ideas what could be going wrong here?