action « validation « JSF Q&A

1. How to skip action when validation with a custom validator fails?

I have a small webapplication for a library, with a customized ISBN validator. My .xhtml page for adding a book looks like this:


2. How to validate an empty field in action method?

I have an input field and a button. I want to check if the textinput is valid before executing the button action. If it is valid I will render a response ...

3. validating a form being submitted by 2 actions

here it is, forgive the messy codes (i didn't write them) there's 2 h:commandButtons near the bottom of the code that trigger different actions. right now, both validate the same way since they submit the same form (all except the comments are mandatory). what i need is that if the second button ("Validate") is triggered, only the 2 t:inputFileUpload are mandatory, ...

4. JSF executing action even with validation errors without immediate attribute.

Is there a mechanism in JSF 1.1 to execute and action even if there are validation errors without using immediate attribute. Lets take an example: We have a JSF page with - One input field that is has value pointing to a Integer in a backing bean - Table with Integer input fields pointing to List in backing bean. - Button ...