Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
JSF ig:gridView and default sorting
posted

Hi,

Is it possible to implement default sorting in JSF gridView, so that when grid appears for the first time in the page, the data is already sorted based on certain fields.

Any suggestions are welcome..

 

Thanks

Jansun

  • 2301
    Verified Answer
    posted

    The easiest way is probably to just sort your collection that way. If your collection is being loaded via SQL, you can just set an "order by" clause.

    The other way is to get a reference to the grid itself and then invoke the built-in sorting methods.

    Best,
    Jim