I have a registration form with the following data:
First Name Last Name Age Email address Tel Number password re enter password.
Now if the passwords dont match or the age is a text error messages are show, i have a reset button to clear all the fields, but after the error comes up the resent button doesnt clear the messages or the fields.
Here is the code for the Button and whats in my java class:
<h:commandButton value="Reset" type="reset" action="#{javaBeanTest.reset()} />
In the Bean Class:
public void reset()
{
this.foreName = null;
this.surname = null;
this.age = 0;
this.password = null;
this.confirmPass = null;
this.email = null;
}
How would i go about this? The Fields gets set to blank but messages remain