@Override public void actionPerformed(final ActionEvent event) { NotifyUser.askConfirmation( i18n.t("Confirm, please:"), i18n.t( "This will open a specific chatroom to chat about this page or document (it's useful to chat with others about something while reading/modifing it). Are you sure?"), new SimpleResponseCallback() { @Override public void onCancel() {} @Override public void onSuccess() { final String subject = i18n.t("Chat about: [%s]", session.getContentState().getTitle()); final StateToken token = session.getCurrentStateToken(); chatClient .get() .joinRoom( token.toString().replaceAll("\\.", "-"), subject, session.getCurrentUserInfo().getShortName()); chatClient.get().show(); } }); }