docs: private void initFields() {
  
          CmsObject cms = A_CmsUI.getCmsObject();
          boolean online = cms.getRequestContext().getCurrentProject().isOnlineProject();
  
          if (m_searchPattern.getValue().isEmpty()) {
              m_searchPattern.setValue(REGEX_ALL);
          }
          m_resourceSearch.setUseRootPaths(true);
          m_replaceResource.setUseRootPaths(true);
          m_resourceSearch.requireFile();
          m_replaceResource.requireFile();
          CmsObject rootCms;
          try {
              rootCms = OpenCms.initCmsObject(cms);
  
              rootCms.getRequestContext().setSiteRoot("");
              m_resourceSearch.setCmsObject(rootCms);
              m_resourceSearch.setDefaultPath(cms.getRequestContext().getSiteRoot());
              m_replaceResource.setCmsObject(rootCms);
              m_replaceResource.setDefaultPath(cms.getRequestContext().getSiteRoot());
  
          } catch (CmsException e1) {
              //
          }
          m_siteSelect.setContainerDataSource(
              CmsVaadinUtils.getAvailableSitesContainer(cms, CmsVaadinUtils.PROPERTY_LABEL));
          m_siteSelect.setItemCaptionPropertyId(CmsVaadinUtils.PROPERTY_LABEL);
          m_siteSelect.setTextInputAllowed(true);
          m_siteSelect.setNullSelectionAllowed(false);
          m_siteSelect.setFilteringMode(FilteringMode.CONTAINS);
          m_siteSelect.setValue(cms.getRequestContext().getSiteRoot());
          try {
              for (CmsPropertyDefinition prop : A_CmsUI.getCmsObject().readAllPropertyDefinitions()) {
                  m_property.addItem(prop);
                  m_property.setItemCaption(prop, prop.getName());
              }
          } catch (CmsException e) {
              //
          }
          m_siteSelect.addValueChangeListener(new ValueChangeListener() {
  
              private static final long serialVersionUID = -1079794209679015125L;
  
              public void valueChange(ValueChangeEvent event) {
  
                  try {
                      updateSearchRoot();
                  } catch (CmsException e) {
                      LOG.error("Unable to initialize CmsObject", e);
                  }
              }
  
          });
          m_property.setNullSelectionAllowed(false);
          m_property.select(m_property.getItemIds().iterator().next());
          m_property.setFilteringMode(FilteringMode.CONTAINS);
          m_searchType.setFilteringMode(FilteringMode.OFF);
          m_searchType.setNullSelectionAllowed(false);
          m_searchType.addItem(SearchType.fullText);
          m_searchType.setItemCaption(
              SearchType.fullText,
              CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_SERACH_TYPE_FULLTEXT_0));
          m_searchType.addItem(SearchType.contentValues);
          m_searchType.setItemCaption(
              SearchType.contentValues,
              CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_SERACH_TYPE_XMLCONTENT_0));
          m_searchType.addItem(SearchType.properties);
          m_searchType.setItemCaption(
              SearchType.properties,
              CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_PROPERTY_SEARCH_0));
          m_searchType.addItem(SearchType.resourcetype);
          m_searchType.setItemCaption(
              SearchType.resourcetype,
              CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_RESOURCE_SEARCH_0));
          m_searchType.addItem(SearchType.renameContainer);
          m_searchType.setItemCaption(
              SearchType.renameContainer,
              CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_RENAME_CONTAINER_SEARCH_0));
          if (OpenCms.getSearchManager().getSolrServerConfiguration().isEnabled()) {
  
              m_searchIndex.setFilteringMode(FilteringMode.OFF);
              m_searchIndex.setNullSelectionAllowed(false);
              String selectIndex = null;
              for (CmsSearchIndex index : OpenCms.getSearchManager().getAllSolrIndexes()) {
                  boolean offlineMode = I_CmsSearchIndex.REBUILD_MODE_OFFLINE.equals(index.getRebuildMode());
                  // in case the current project is offline, show offline indexes, otherwise show online indexes
                  if ((!online && offlineMode) || (online && !offlineMode)) {
                      m_searchIndex.addItem(index.getName());
                      if (selectIndex == null) {
                          selectIndex = index.getName();
                      }
                  }
              }
              if (selectIndex != null) {
                  m_searchIndex.setValue(selectIndex);
  
                  // only add the solr search types if there is an index available
                  m_searchType.addItem(SearchType.solr);
                  m_searchType.setItemCaption(
                      SearchType.solr,
                      CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_SERACH_TYPE_SOLR_0));
                  m_searchType.addItem(SearchType.solrContentValues);
                  m_searchType.setItemCaption(
                      SearchType.solrContentValues,
                      CmsVaadinUtils.getMessageText(Messages.GUI_SOURCESEARCH_SERACH_TYPE_SOLR_CONTENT_VALUES_0));
  
              }
          }
          m_searchType.setValue(SearchType.fullText);
  
          m_searchRoot.setValue("/");
          m_searchRoot.disableSiteSwitch();
          m_searchRoot.setResourceFilter(CmsResourceFilter.DEFAULT_FOLDERS);
          m_searchRoot.requireFolder();
          m_locale.setFilteringMode(FilteringMode.OFF);
          for (Locale locale : OpenCms.getLocaleManager().getAvailableLocales()) {
              m_locale.addItem(locale);
          }
  
          m_resourceType.setNullSelectionAllowed(true);
          IndexedContainer resTypes = CmsVaadinUtils.getResourceTypesContainer();
          resTypes.addContainerFilter(CmsVaadinUtils.FILTER_NO_FOLDERS);
  
          m_resourceType.setContainerDataSource(resTypes);
          m_resourceType.setItemCaptionPropertyId(PropertyId.caption);
          m_resourceType.setItemIconPropertyId(PropertyId.icon);
          m_resourceType.setFilteringMode(FilteringMode.CONTAINS);
  
          m_workProject.setNullSelectionAllowed(false);
          IndexedContainer projects = CmsVaadinUtils.getProjectsContainer(A_CmsUI.getCmsObject(), "caption");
          projects.removeItem(CmsProject.ONLINE_PROJECT_ID);
          m_workProject.setContainerDataSource(projects);
          m_workProject.setItemCaptionPropertyId("caption");
  
          if (online) {
              m_replace.setEnabled(false);
          } else {
              m_workProject.setValue(cms.getRequestContext().getCurrentProject().getUuid());
          }
      }