NOTE: "login pages" may be fine for training purposes, but for real-world web applications, please use the
J2EE built-in login system. User-designed security systems are almost universally insecure.
When a page is displayed in
JSF, the control values displayed will be whatever values were in the backing bean (Model) associated with that page (View definition). To clear the display, clear the backing bean values. Do not attempt to directly manipulate the UI itself.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.