| Author |
No Validation Message is displayed !!
|
David Salaete
Greenhorn
Joined: Aug 27, 2008
Posts: 19
|
|
Hi all, I�m having this problem: I have a rich:datatable: <rich:column> <h:inputText id="idE1" value="#{...}"> <f:validator validatorId="positivoValidator"/> </h:inputText> <h:message for="idE1" styleClass="aviso"/> </rich:column> positivoValidator validates that is a number and is more than 0 and some other irrelevant things. When I push a button, I validate in the Managed Bean that the value is less than certain value. (Because that value is variable, I cannot do this validation in the "positivoValidator"): MessageFactory mf = new MessageFactory(); FacesContext ctx = FacesContext.getCurrentInstance(); if( myValue > topValue) { ctx.addMessage("idIPMForm:idE1", new FacesMessage(FacesMessage.SEVERITY_ERROR, mf.getMessage("errorExcesoEnergia"), null)); } ... return; But... I obtain the message "WARNING: FacesMessage(s) have been enqueued, but may not have been displayed." and the message is not displayed. Moreover, those messages generated via "positivoValidator" are being displayed Ok. Why are the Managed-Bean generated one failing?? Thanks in advance, David S.
|
There are 10 types of people: Those who understand binary code and those who don�t.
|
 |
Darryl Nortje
Ranch Hand
Joined: Jun 11, 2002
Posts: 140
|
|
Hey David, That error
WARNING: FacesMessage(s) have been enqueued, but may not have been displayed
normally logs when you have successfully set the error message, but have no message element in the page to display that message... cheers Darryl
|
 |
 |
|
|
subject: No Validation Message is displayed !!
|
|
|