4 Replies Latest reply on Dec 22, 2009 9:46 AM by 702046

    Sorting a column according to LOV displayattribute's value?


      a quick question over an issue that probably some of you have already encountered.

      How to sort an af:column in a table according to the content (displayname) of the LOV associated with the FK attribute?

      e.g. field Orders.CustomerId with a LOV that takes values from a Customers table, LOV value: Customers.Id, LOV display attribute: Customers.Name
      If I click on the CustomerId column on the parent af:table (Orders), the column gets ordered according to Orders.CustomerID (or Customers.Id, they're the same of course) which is meaningless to the user.

      How to actually make the column ordered according to what the user actually sees, thus Customers.Name?
      Tried fiddling with af:column's sortProperty but got nowhere.

      Is there a way to get this behaviour?

      thx in advance