title: Jsf redirect to new window
body: <p>i'm making a JSF2.0 project using mojarra primefaces tomcat6.x.</p>
  
  <p>I made a select list and when i select item of the list i want to redirect to the selected url. It can be an internal URL.</p>
  
  <p>It's work but i want to know if it's possible to redirect in new window.</p>
  
  <p>I have the following code JSF:</p>
  
  <pre><code>        &lt;h:form&gt;
              &lt;h:selectOneMenu onchange="this.form.submit();" valueChangeListener="#{wagent.selectBusinessTravelLink}"&gt;
                  &lt;f:selectItem itemLabel="#{msg['form.select.defaultValue']}" itemValue="" noSelectionOption="true"/&gt;
                  &lt;f:selectItems value="#{wagent.businessTravelLinks}" var="bLinkItem" itemLabel="#{bLinkItem.label}" itemValue="#{bLinkItem.id}" /&gt;
              &lt;/h:selectOneMenu&gt;
          &lt;/h:form&gt;
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>   public void selectBusinessTravelLink(ValueChangeEvent event) {
  // some stuff
  FacesContext.getCurrentInstance().getExternalContext().redirect(targetUrl);
  }
  </code></pre>