Use Case : If the AutoSubmit property of any input field is enabled and validation is done on other input field in a form, many a times on partial submit of the first input field, validation error occurs in the second input field.
So to turn off the server-side validation, we have to extend 'oracle.adf.controller.v2.lifecycle.PageController' in the backing bean and override the 'validateModelUpdates()' as shown below:
So to turn off the server-side validation, we have to extend 'oracle.adf.controller.v2.lifecycle.PageController' in the backing bean and override the 'validateModelUpdates()' as shown below:
public class MyBackingBean extends oracle.adf.controller.v2.lifecycle.PageController {public void validateModelUpdates(LifecycleContext context) {FacesContext fctx = FacesContext.getCurrentInstance();//skip validation on partial submitif(PartialPageUtils.isPartialRequest(fctx)){//super.validateModelUpdates(context); //skip - no refresh}else{super.validateModelUpdates(context);}}
No comments:
Post a Comment