private Container getContainerRootParent ( Container base ) { Container puBase = base . getEnclosingContainer ( ) ; while ( puBase != null && ! puBase . isRoot ( ) ) { puBase = puBase . getEnclosingContainer ( ) ; } if ( puBase != null && puBase . isRoot ( ) ) { Container parent = puBase . getEnclosingContainer ( ) ; if ( parent != null ) { puBase = parent ; } } return puBase ; }
Navigates to the root of the base container and returns the parent container