On a related note, i have read a lot of articles that call the validating class a 'backing bean'. How is it different from a 'managed bean'. And why is it called a bean when it doesn't have any set/get methods?
Thanks.
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
Gina vernon wrote:Hi,
And I can't get it to work.
Elaborate the problem in detail. What happens? What happens not?
On a related note, i have read a lot of articles that call the validating class a 'backing bean'. How is it different from a 'managed bean'. And why is it called a bean when it doesn't have any set/get methods?
The validator class is not a backing bean class. Either the article is wrong or you misinterpreted the article.
To the point, a backing bean is a java class which can be managed by JSF as managed bean. A managed bean is a backing bean instance which is been managed by JSF.
Bauke Scholtz wrote:
Elaborate the problem in detail. What happens? What happens not?
My validator implementation does not validate my password when the length of the password is less than 5. It goes through to a welcome page. I expect it to print the error message I specified in the implementation class.
Thanks.
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
Please analyze the problem at developer's level, not at user's level. The situation at the user's level is clear enough for us, developers.
Do the validator method for instane get executed? Does the string reference 'passw' contain the expected value? Are all the JSF phases executed? Etcetera. Debug your code and see what happens and what not. What lines got executed according expectations and what not. That kind of things.
Gina vernon
Ranch Hand
Joined: Jan 16, 2009
Posts: 108
posted
0
I found the solution! There is nothing wrong with the code as it turns out, so its not a developer level issue. Its more a page designer issue. I needed to put this tag in to the JSP:
.
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
So your validator actually does validate the input and does add the message, but the message doesn't show up.