Search code examples
lift

How do I sort view list results in a crudify lift "page"?


I am using a CRUDify object to do a simple admin app. I would like to sort the results that the "list" page displays. Is there a quick way to do this?

Thanks.


Solution

  • I figured out by reading the source:

    If you extend CRUDIFY you can override findForListParams to do this. The following will order by the description field ascending

    override def findForListParams = {
       List(OrderBy(description, Ascending))
    }