code: public void onClickOk(CmsResource selected) {
  
          try {
              CmsResource target = selected;
              CmsResource source = m_context.getResources().get(0);
              CmsLocaleGroupService service = A_CmsUI.getCmsObject().getLocaleGroupService();
              service.attachLocaleGroupIndirect(source, target);
              m_context.finish(Arrays.asList(source.getStructureId()));
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
              m_context.error(e);
          }
      }
docs: Executed when the 'OK' button is clicked.<p>
  
  @param selected the selected resource