I have a problem regarding render in JSF. I have created two radio buttons "Enable" and "Disable" and a textbox.I have written the validation for the text box using required="true" attribute so that that textbox cannot be empty.My question is that is it possible such that validation happens only if "enable" radio button is selected? when "Disable" is selected validation should not happen.I have already used render for the input text box.so i cannot use render again for validation.Any suggestions?
And the reason i am asking for it is that if the user enters say 0 in the textbox and then he selects "Disable" button i am still getting the validation error message(I have a validation such that the value in the textbox cannot be 0) .
I'm afraid that view-level validation is unconditional. Conditional validation is something that the action handler method must do. The only other way would be to create a complex custom validator, and that's rarely worth it.
An IDE is no substitute for an Intelligent Developer.