code: public void registerExternalWidgets(
          List<CmsExternalWidgetConfiguration> externalWidgetConfigurations,
          final Command callback) {
  
          final Set<String> initCalls = new HashSet<String>();
          for (CmsExternalWidgetConfiguration widgetConfiguration : externalWidgetConfigurations) {
              if (!m_widgetRegistry.containsKey(widgetConfiguration.getWidgetName())) {
                  for (String cssResource : widgetConfiguration.getCssResourceLinks()) {
                      CmsDomUtil.ensureStyleSheetIncluded(cssResource);
                  }
                  for (String javaScriptResource : widgetConfiguration.getJavaScriptResourceLinks()) {
                      CmsDomUtil.ensureJavaScriptIncluded(javaScriptResource);
                  }
                  String initCall = widgetConfiguration.getInitCall();
                  if (initCall != null) {
                      initCalls.add(initCall);
                  }
              }
          }
          if (initCalls.isEmpty()) {
              callback.execute();
          } else {
              Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
  
                  /** The number of repeats. */
                  private int m_repeats;
  
                  /**
                   * @see com.google.gwt.core.client.Scheduler.RepeatingCommand#execute()
                   */
                  public boolean execute() {
  
                      m_repeats++;
                      Iterator<String> it = initCalls.iterator();
                      while (it.hasNext()) {
                          String initCall = it.next();
                          if (tryInitCall(initCall)) {
                              it.remove();
                          }
                      }
                      if (initCalls.isEmpty()) {
                          callback.execute();
                          return false;
                      } else {
                          if (m_repeats < 100) {
                              return true;
                          } else {
                              showInitCallError(initCalls);
                              return false;
                          }
                      }
  
                  }
              }, 50);
          }
      }
docs: Registers external widgets.<p>
  
  @param externalWidgetConfigurations the external widget configurations
  @param callback the callback to execute when done