code: public void saveTreeState(final String treeName, final String siteRoot, final Set<CmsUUID> openItemIds) {
  
          CmsRpcAction<Void> treeStateAction = new CmsRpcAction<Void>() {
  
              @Override
              public void execute() {
  
                  start(600, false);
                  getGalleryService().saveTreeOpenState(treeName, getTreeToken(), siteRoot, openItemIds, this);
              }
  
              @Override
              protected void onResponse(Void result) {
  
                  stop(false);
              }
          };
          treeStateAction.execute();
  
      }
docs: Saves the tree state for a given tree on the server.<p>
  
  @param treeName the tree name
  @param siteRoot the site root
  @param openItemIds the structure ids of opened items