SourceForge has been redesigned. Learn more.

default order by clause

  • 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

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

    Fabiana Bugli - 2012-01-30

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


Log in to post a comment.