code: protected void ensureEntriesLoaded(CmsGalleryTreeItem parent) {
  
          CmsList<? extends I_CmsListItem> children = parent.getChildren();
          Set<String> parentPaths = new HashSet<String>();
          for (Widget listItem : children) {
              CmsGalleryTreeItem treeItem = (CmsGalleryTreeItem)listItem;
              CmsUUID entryId = treeItem.getEntryId();
              if (m_controller.getEntryById(entryId) == null) {
                  parentPaths.add(CmsResource.getParentFolder(treeItem.getSitePath()));
              }
          }
          for (String parentPath : parentPaths) {
              m_controller.loadPath(parentPath);
          }
      }
docs: Makes sure corresponding sitemap entries are loaded when the gallery tree is opened.<p>
  
  @param parent the parent gallery tree item