From the code in the preceding section, we see that the UserBean class manages the communication between the UI and the server. Once you instantiate the user object, it is available for both of them.
That's why, when you run it, Name | E-mail is already filled (the user object is instantiated when the UserBean class is created by the server).
We associated the userAction() method from the UserBean class with the Validate button of the UI:
So, our two implemented interfaces used here are userConverter and userValidator.
Basically, the UserConverter class (with the getAsString and getAsObject methods) converts an object into/from a string and vice versa, according to the logic defined by you.
We have just mentioned it in the preceding code snippet:
value="#{userBean.user}"
The server uses the userConverter object, calls the getAsString method, and prints the result using the preceding expression language.
Finally, the UserValidator class is automatically called when you submit the form, by calling its validate method, and applying the rules defined by you.