In my application I placed a <p:panel>
in a <h:form>
. Now in this panel I have some <p:inputText>
and at the end of panel I have two button one is Submit
another is
Reset
. Reset
button works properly if it is pressed before submit the form. But if Once I submit the form
and some text fields fails to validate
then that fields are containing the previous entered data. Now if I press Reset
button to clear all the fields then it is not working.
My Reset
button's code :
<p:commandButton value="#{Bundle['resetButton']}" process="@this" update="addCustomerPanel" immediate="true" />
The form is like :
<h:form id="customerForm">
<p:panel id="addCustomerPanel">
.......text fields and two buttons placed here
</p:panel>
<h:form>
Update
I have solved this problem by navigate to the same page on reset
button click.