code: public void saveFavorites() {
  
          m_isEditingFavorites = false;
          getHandler().enableFavoriteEditing(false, m_dndController);
          List<String> clientIds = new ArrayList<String>();
          Iterator<Widget> it = m_favorites.iterator();
          while (it.hasNext()) {
              try {
                  CmsMenuListItem element = (CmsMenuListItem)it.next();
                  element.hideRemoveButton();
                  element.showEditButton();
                  clientIds.add(element.getId());
              } catch (ClassCastException e) {
                  CmsDebugLog.getInstance().printLine("Could not cast widget");
              }
          }
          getHandler().saveFavoriteList(clientIds);
      }
docs: Saves the favorite list.<p>