posted 6 years ago
Hi,
I am new to JSF and I have been trying to solve this since a week now.
I am using <h:messages> to display on the top of the page, all the errors on the page.
Issue is when I submit the form for the FIRST TIME, a single error message gets displayed twice.
But when I submit the form again, the error message gets displayed just once which is what I want.
Can anyone please explain why <h:messages> is behaving like this.
Appreciate it. Thanks.
I am new to JSF and I have been trying to solve this since a week now.
I am using <h:messages> to display on the top of the page, all the errors on the page.
Issue is when I submit the form for the FIRST TIME, a single error message gets displayed twice.
But when I submit the form again, the error message gets displayed just once which is what I want.
Can anyone please explain why <h:messages> is behaving like this.
Appreciate it. Thanks.
posted 6 years ago
Can you post your page tags that are causing this?
you should be aware that there is an attribute specific to <h:messages> that is not available in the component-specific <h:message> tag: . This will display only messages that are NOT queued for a specific component. However, if you are not using this attribute, and you have component-specific messages as well, it will display both...once with the <h:message> tag, and once with the <h:messages> tag. I don't know if that's the problem, but I've had similar behavior caused by that default behavior.
you should be aware that there is an attribute specific to <h:messages> that is not available in the component-specific <h:message> tag: . This will display only messages that are NOT queued for a specific component. However, if you are not using this attribute, and you have component-specific messages as well, it will display both...once with the <h:message> tag, and once with the <h:messages> tag. I don't know if that's the problem, but I've had similar behavior caused by that default behavior.
Tom Fulton
Ranch Hand
Posts: 96
posted 6 years ago
"You learn how to avoid mistakes from experience. Unfortunately, you only gain experience by making mistakes".
I've done the same thing a number of times, often when I am copying code and adding some functionality. I don't carefully check to see if I am duplicating something that was already happening in the copied code.
I've done the same thing a number of times, often when I am copying code and adding some functionality. I don't carefully check to see if I am duplicating something that was already happening in the copied code.

Create symphonies in seed and soil. For this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
|