default order by clause

Developers
2012-01-30
2013-04-29
  • Fabiana Bugli

    Fabiana Bugli - 2012-01-30

    Hi, I want to order an entity view table by a certain field,
    i can order by it overriding the search method on the entity Main class,
    but it will work only for the search action,
    how can I have the same order on the "Visualizza tutti" action?
    I'm using the 2.1.0 version
    Thank you

     
  • tglman

    tglman - 2012-01-30

    you can override the executeQuery method it will be called each time
    example:

        @Override
        protected void executeQuery() {
            if (queryRequest instanceof QueryByExample) {
                ((QueryByExample) queryRequest).getAdditionalFilter().addOrder("field");
            } else if (queryRequest instanceof QueryByFilter) {
                ((QueryByFilter) queryRequest).addOrder("field");
            }
            super.executeQuery();
        }
    
     
  • Fabiana Bugli

    Fabiana Bugli - 2012-01-30

    Thank you very much,
    I couldn't find it on the documentation and in the forum neither.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks