title: JSF 2. How do I force close a popup window before continuing navigation?
body: <p>I have this piece of code for render a popup, using f:ajax:</p>
  
  <pre><code>                        &lt;h:commandButton id ="botonAcceso"
                                      value="#{msg['login.enter']}"
                                      styleClass="botonPeque"
                                      action="#{usuarioAuditoriaLogBean.entraAplicacion}"&gt;
  
                          &lt;f:ajax disabled="true"
                                  render=":login:errorAcceso"/&gt;
                      &lt;/h:commandButton&gt;
  
                      &lt;h:panelGroup rendered="#{usuarioAuditoriaLogBean.popup}" id="errorAcceso"&gt;
                          &lt;ui:fragment&gt;
                              &lt;script&gt;window.open('#{usuarioAuditoriaLogBean.url}');&lt;/script&gt;
                          &lt;/ui:fragment&gt;
                      &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>I want the person, who is trying to log, must first close the popup if the logging process fails, to try to log again. How can I do that?</p>
  
  <p>Many thanks.</p>