Friday, September 24, 2010

Highlight the currently selected row with a different color in ADF table

The following styleClass EL expression would achieve the required functionality

<af:table value="#{bindings.EmployeeDetailsVO.collectionModel}"
          var="row" rows="#{bindings.EmployeeDetailsVO.rangeSize}"
          styleClass=#{row.row ==  bindings.EmployeeDetailsVO.currentRow ? 'background-color:Green;' : 'default'}
          emptyText="#{bindings.EmployeeDetailsVO.viewable ? 'No results'  : ' Denied.'}"
          fetchSize="#{bindings.EmployeeDetailsVO.rangeSize}" rowSelection="single"
          rowBandingInterval="1" columnStretching="last" autoHeightRows="-1" id="t2"
          disableColumnReordering="true">

No comments:

Post a Comment