I want to process JSR-303 validation myself, i.e., get validation factory and invoke validate method myself:
class FormBean {
    void saveForm() {
         if (! doValidate()) {
             FacesContext.addMessage(...);
             return;
         }
         ...
     }
     void doValidate() { ... }
 }
Is there any way to disable the bean validation integrated in JSF? (Not that immediate="true", which will开发者_如何学Go not only bypass the validation, but also bypass update-model phases)
You can disable it by disabling the validator for the fields:
<h:inputText value="#{bean.name}">
  <f:validateBean disabled="true"/>
</h:inputText>
Update: In order to disable the bean validation for every input field by default, try to set the context variable: javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR with the value 'true'
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论