code: public CommonDialogWindow getWindow(final E entity, final String metaDatakey) {
          selectedEntity = entity;
  
          metadataWindow = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(getMetadataCaption())
                  .content(this).cancelButtonClickListener(event -> onCancel())
                  .id(UIComponentIdProvider.METADATA_POPUP_ID).layout(mainLayout).i18n(i18n)
                  .saveDialogCloseListener(new SaveOnDialogCloseListener()).buildCommonDialogWindow();
  
          metadataWindow.setHeight(550, Unit.PIXELS);
          metadataWindow.setWidth(800, Unit.PIXELS);
          metadataWindow.getMainLayout().setSizeFull();
          metadataWindow.getButtonsLayout().setHeight("45px");
          setUpDetails(entity.getId(), metaDatakey);
          return metadataWindow;
      }
docs: Returns metadata popup.
  
  @param entity
  entity for which metadata data is displayed
  @param metaDatakey
  metadata key to be selected
  @return {@link CommonDialogWindow}