0 Replies Latest reply on Oct 20, 2011 2:28 PM by Anwarul Kabir

    a:visited link not working in JSF data table

    Anwarul Kabir Newbie

      I have a jsf page where i am looping through a set of data and providing a link in each row to the user for drill down purpose. 

      <rich:dataTable
        id="searchResultsTable"
        rendered="#{!empty searchAction.transactionSearchResults}"
        sortMode="single"
        value="#{transactionSearchResults}"
        var="result"
        rows="#{searchAction.defaultPageSize}">

      ...
      <rich:column headerClass="#{(searchAction.sortBy eq '1')?(searchAction.sortOrder):(blank)}">
        <f:facet name="header">
         <h:commandLink
        id="transactionCodeSortButton"
        styleClass="transactionCode"
        action="#{searchAction.sortTransactions}"
        value="NIPR TRANS">
        <f:param
        name="sortBy"
        value="1" />
         </h:commandLink>
        </f:facet>
       
        <s:link styleClass="link-color" action="#{searchAction.getAllDetails}" value="#{result.transactionCode}" />
        </rich:column>

       

       

       

      and here is the css for it

      a.link-color{ color:blue;text-decoration:none; } a.link-color:visited { color:red;text-decoration:none; }

       

       

      Now the issue is in loop jsf doesn't let me set the id. so when users drill downs row one, it shows the link as red which is fine but if the user comes back to the same page with new results the row one still shows as visited.

      I was wondering if some one else have faced this issue and know how to work around this.

      Thanks