title: validation and rich: popupPanel don't work
body: <p>My intention is to display a message to the user in a rich: popupPanel after insert a record in BD.</p>
  
  <p>With the code below I get to do what I want, but with a problem. Only works when I type all page fields correctly. If one of the fields does not pass in validation, the validation message is displayed in the h:messages, and the page does not change, even if I change the contents of the field and click the button again.</p>
  
  <p>What could be wrong?</p>
  
  <ul>
  <li><p>page</p>
  
  <p>
      
          
      </p>
  
  <pre><code>&lt;h:outputLabel value="Nome:" for="nome1" /&gt;
  &lt;h:inputText id="nome1" maxlength="50" required="true" requiredMessage="Informe um nome" immediate="true"/&gt;
  
  &lt;h:outputLabel value="Logradouro:" for="logradouro" /&gt;
  &lt;h:inputText id="logradouro" maxlength="50" required="true" requiredMessage="Informe o logradouro" immediate="true"/&gt;
  
  &lt;h:outputLabel value="Bairro:" for="bairro" /&gt;
  &lt;h:inputText id="bairro" maxlength="45" required="true" requiredMessage="Informe o bairro" immediate="true" /&gt;
  
  &lt;h:outputLabel value="CEP:" for="cep" /&gt;
  &lt;h:inputText id="cep" maxlength="8" required="true" requiredMessage="Informe o CEP" immediate="true"&gt;
      &lt;f:convertNumber integerOnly="true" groupingUsed="false" maxIntegerDigits="8" /&gt;
  &lt;/h:inputText&gt;
  
  &lt;a4j:commandButton id="btnInserirDizimista" value="Inserir" oncomplete="#{rich:component('pnlOk')}.show()" render="pnlMessages outPnlOk" actionListener="#{dizimistaMB.inserirDizimista}"/&gt;
  
  &lt;a4j:outputPanel id="outPnlOk" ajaxRendered="true"&gt;
  &lt;rich:popupPanel id="pnlOk" modal="true" height="150"&gt;
          &lt;h:graphicImage value="/images/info.jpg" /&gt;
          &lt;h:outputText id="textoModalOk" value="#{dizimistaMB.textoModal}" /&gt;
          &lt;h:commandButton value="OK" action="dizimista?faces-redirect=true"
              onclick="#{rich:component('pnlOk')}.hide(); return false;" &gt;
              &lt;a4j:ajax execute="formPnlOk" /&gt;
          &lt;/h:commandButton&gt;
      &lt;/rich:popupPanel&gt;
  &lt;/a4j:outputPanel&gt;
  </code></pre>
  
  <p></p></li>
  <li><p>managed bean</p>
  
  <pre><code>public void inserirDizimista(){
      try{
          defineDizimista("formNovoDizimista");
          dizimistaFacade.criar(dizimista);
          setTextoModal("Dizimista inserido com sucesso");
          System.out.println("Dizimista '" + dizimista.getNome1() + "' inserido com sucesso");
          dizimista = null;
      } catch (DAOException e) {
          FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), null);
          JSFHelper.getFacesContext().addMessage("ATENÇÃO!", msg);
          e.printStackTrace();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  
  private void defineDizimista(String nomeForm){
      Map&lt;String, String&gt; dados = getDadosFormulario(nomeForm);
      dizimista.setNome1(dados.get("nome1"));
      dizimista.setLogradouro(dados.get("logradouro"));
      dizimista.setBairro(dados.get("bairro"));
      dizimista.setCep(Integer.parseInt(dados.get("cep")));
  }
  
  private Map&lt;String, String&gt; getDadosFormulario(String form){
      Map&lt;String, String&gt; dados = new HashMap&lt;String, String&gt;();
      dados.put("nome1", JSFHelper.getRequestParameter(form +
          UINamingContainer.getSeparatorChar(JSFHelper.getFacesContext()) + "nome1"));
      dados.put("logradouro", JSFHelper.getRequestParameter(form +
          UINamingContainer.getSeparatorChar(JSFHelper.getFacesContext()) + "logradouro"));
      dados.put("bairro", JSFHelper.getRequestParameter(form +
          UINamingContainer.getSeparatorChar(JSFHelper.getFacesContext()) + "bairro"));
      dados.put("cep", JSFHelper.getRequestParameter(form +
          UINamingContainer.getSeparatorChar(JSFHelper.getFacesContext()) + "cep"));
      dados.put("cidade", JSFHelper.getRequestParameter(form +
          UINamingContainer.getSeparatorChar(JSFHelper.getFacesContext()) + "cidade"));
      return dados;
  }
  </code></pre></li>
  </ul>