I�ve got a problem with validation when I have two forms on the same page. In each form I display my error message by using h:messages. The problem is when I get an error on one form I end up displaying the message on both forms. I thought about using h:message and the �for� attribute, but this does not work. Reason being I�ve got backend validation that is not field specific it is form specific. Is there a way to tie h:messages to the form it�s contained in?
I don't believe you can do this with the h:messages. h:messages pulls all messages out of the current FacesContext instance, which will display any messages in there whether from form validation or otherwise.
I saw your problem and thought you could help me with my problem. Some of my jsf forms have other jsf forms included. I am trying to validate fields on both forms but validation only effects the fields on the main form and not on the included form. Could you please give me any advise?
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad: