April 27, 2020
Estimated Post Reading Time ~

How to find a Page has child Pages thorough Java API - AEM/Adobe CQ5

This post will explain how to find a Page has child Pages thorough Java API in AEM

public static boolean hasPageChildren(Page rootPage) {
          boolean isTrue = false;
          if (rootPage != null&& rootPage.listChildren(getPageFilter()).hasNext()) {
        isTrue = true;
          }
        return isTrue;
}

public static PageFilter getPageFilter() {
 PageFilter pf = new PageFilter();
 return pf; 
}


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.