Question

I have several xhtml pages they are all identical with exception to one. They all have a single <form> tag, whereas the last one has 4 x <form>.

The issue I am experiencing is with the validation "ConverterException" being applied to the Reset button. The validation is set to display a message using FacesContext in AJAX.

I added immediate="true" to all the Reset buttons on all the pages to bypass the validation error so that it will clear out the input text boxes and not throw an error on invalid input.

This works perfectly on all pages except the last one which has 4 <form> on it with 4 separate reset buttons.

The first reset button works as expected like all the other pages, but the second, third, fourth reset button will throw the validation error - its not behaving the same as the rest.

What is the fix in this situation?

Was it helpful?

Solution

I added reset() to the onclick event in addition to the immediate="true" and it resolved the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top