1 Reply Latest reply on Jul 8, 2009 4:32 AM by Matias Santana

    Error on showing error messages

    Matias  Santana Newbie

      Hi guys!
      I've stucked on this like a week ago and i hope someone has a clue.


      Here´s the situation.


      I have a modal panel with an ajax commmandButton, and when i press it, the method on the backing bean makes some validations.
      If there´s exists not valid data i throw an exception, and add to FacesMessage a message.


      I tried with all components like h message or rich message, but without succed.


      Here you have the code.



      This is the button on the page


      <a:commandButton value="Aceptar" rendered="#{movimientoHome.operacionSeleccionada != 'Transferir'}"
                propagation="default" title="Aceptar"
                     id="btnStockModif" 
                    action="#{stockHome.agregarProductoAfectado()}" reRender="stockSelecList">
      </a:commandButton>



      Here is where i add the message to FacesMessage:




      catch (NoResultException e) {
              e.printStackTrace();
           FacesMessages.instance().add("No existe un factor para las unidades de medida seleccionadas");
           return false;
      }
      




      I have deleted from the coded all the message components, hoping someone has an idea where to put it.




      Thanx in advice guys!!! I really need this help.!