code: public void addToRecentList(final String clientId, final Runnable nextAction) {
  
          CmsRpcAction<Void> action = new CmsRpcAction<Void>() {
  
              /**
               * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
               */
              @Override
              public void execute() {
  
                  getContainerpageService().addToRecentList(getData().getRpcContext(), clientId, this);
              }
  
              /**
               * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
               */
              @Override
              protected void onResponse(Void result) {
  
                  if (nextAction != null) {
                      nextAction.run();
                  }
              }
          };
          action.execute();
      }
docs: Adds an element specified by it's id to the recent list.<p>
  
  @param clientId the element id
  @param nextAction the action to execute after the element has been added