If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Tuesday, September 21, 2010

JSF form reset problem

Suppose you have a search form with 2 required fields. If you want to reset the form and the values on the controller (@scope=session), you will find that JSF will not let you submit the form as the validation phase will already raise an exception. And let's also assume you want to do some business logic validation before proceeding with the actual action invocation. The code below shows you a quick way to get the job done. The solution is to NOT put the @required=true in your jsf page but accomplish the same behaviour through your own validation method.

No comments:

Post a Comment