-1

I'm developing a project using java and jsf. I am trying to open Google Calendar when the user clicks on a commandLink but I have no clue about how to do it.

Does anyone knows how can I handle this?

Thanks in advance

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
Aldeguer
  • 821
  • 9
  • 32
  • check this link it might help https://developers.google.com/google-apps/calendar/quickstart/java – Rahul Singh May 29 '17 at 07:56
  • I have been already reading that, but it only shows you how to insert, get ... events and calendars. Thanks anyway! – Aldeguer May 29 '17 at 08:01
  • 2
    Possible duplicate of [Redirecting to an external URL in a new tab and performing an action in backing bean at the same time](https://stackoverflow.com/questions/10188912/redirecting-to-an-external-url-in-a-new-tab-and-performing-an-action-in-backing) – Jasper de Vries May 29 '17 at 08:46

1 Answers1

1

You can use a method like this:

public void goTo(){
  ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
  externalContext.redirect("YOUR URL");
}
DMC19
  • 825
  • 2
  • 14
  • 33