1 Reply Latest reply on Feb 8, 2013 6:49 PM by splram

    How to iterate child order by a property?

    apark2900

      Hi,

       

      In sql, you can do "selec * from table order by date".

       

      What if I want to do iterate child node order by "jcr:created"?

       

      something like this?????

       

      Iterator<Page> children = rootPage.listChildren(new PageFilter(request)).orderBy("jcr:created");

      while (children.hasNext()) {

           Page child = children.next();

           out.println(child.getTitle());

      }