code: protected Component getResourceComponent(String path) {
  
          try {
              CmsPathSelectField field = new CmsPathSelectField();
              field.setUseRootPaths(true);
              CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
              cms.getRequestContext().setSiteRoot("");
              field.setCmsObject(cms);
              if (path != null) {
                  field.setValue(path);
              }
              return field;
          } catch (CmsException e) {
              //
          }
          return null;
      }
docs: Get vaadin component with given path.<p>
  
  @param path of resource
  @return Vaadin component