1 Reply Latest reply on Jun 20, 2013 6:17 AM by Siva P

    How to redirect from Java Bean to a new window or tab.

    Sandeep Singh Newbie

      Hi All,

       

      I have a h:commandButton from where a action in the bean is callled and then I'm setting the external URL which I want to open like this:

      FacesContext.getCurrentInstance().getExternalContext().redirect("http://www.google.com");

      When the Action is complete i.e response is completed, the mentioned URL opens up but in the same window. I want to open it in a new window/tab.

      I also tried putting target="_Blank" to the h:commanButton but it did not work.

      Any suggestion.

       

      Regards,

      Sandy