code: public void updateGalleryData(CmsContainerPageGalleryData galleryData, boolean viewChanged) {
  
          if (m_dialog != null) {
              if (viewChanged) {
                  m_dialog.removeFromParent();
                  m_dialog = null;
              } else {
                  m_dialog.updateGalleryData(galleryData.getGalleryData());
              }
          }
          m_galleryData = galleryData.getGalleryData();
          m_search = galleryData.getGallerySearch();
      }
docs: Updates the gallery data.<p>
  
  @param galleryData the gallery data
  @param viewChanged <code>true</code> in case the element view changed