My <tr:form>contains some fields with validators, including <tr:inputDate>whose validator is built-in. I also have several AJAX / PPR, with attributes partialTrigger, where, say, one option with a list depends on the choice of an earlier list box, entering something in one fade disables the other field, etc.
I need a clear / reset button in this form that performs the expected actions: delete all entries in the form, set default values, etc.
<tr:resetButton>obviously useless. As soon as one PPR occurs, the button does not cancel anything. OTOH is <tr:commandButton text="Clear" action="#{myBean.clear}" />considered to be a JSF transfer, so a check is performed, i.e. If there is at least one field in the form where the user entered the incorrect data, an error message appears next to this field, and the form is not cleared.
What is my alternative? Is there a way to bypass the life cycle and send without confirmation for this button? I will transfer my check to the bean backup, but I cannot do this for<tr:inputDate>
source
share