private void acceptConnection(final ConnectionRequest r, boolean accepted)
     throws NimbitsException {
   UserServiceAsync userService = GWT.create(UserService.class);
   userService.connectionRequestReply(
       r.getTargetEmail(),
       r.getRequestorEmail(),
       r.getKey(),
       accepted,
       new AcceptConnectionAsyncCallback());
 }
 private MenuItem acceptConnectionMenuItem(final Menu scrollMenu, final ConnectionRequest r)
     throws NimbitsException {
   final MenuItem m = new MenuItem(r.getRequestorEmail().getValue());
   m.setIcon(AbstractImagePrototype.create(Icons.INSTANCE.connection()));
   m.addListener(
       Events.Select,
       new AcceptConnectionBaseEventListener(r, scrollMenu, m, connectionRequest));
   return m;
 }
    @Override
    public void handleEvent(final BaseEvent be) {
      //	final Dialog simple = new Dialog();
      // simple.setHeading(");
      try {
        final MessageBox box = new MessageBox();
        box.setButtons(MessageBox.YESNOCANCEL);
        box.setIcon(MessageBox.QUESTION);
        box.setTitle("Connection request approval");
        box.addCallback(
            new ApproveConnectionMessageBoxEventListener(r, scrollMenu, m, connectionRequest));

        box.setMessage(
            "The owner of the email address: '"
                + r.getRequestorEmail().getValue()
                + "' would like to connect with you. You will have read only access to each others data points. Is that OK?");

        box.show();
      } catch (NimbitsException e) {
        FeedbackHelper.showError(e);
      }
    }