06 August, 2011

Skip Validation in ADF


We can add validation at View , Model and business Services as wee need.
Sometimes we need to skip that validation and continue in executing the requested action.
Some developers in set immediate property to TRUE for UIcomponent but there is drawback of that property that it allows processing of UIcomponent to move to Apply Request Values phase of the life cycle.

We have another solution for skipping validation without moving up to  Apply Request Values phase of the life cycle as illustrated below.

The solution is using skip validation property of page definition file.
open page definition file and choose root node and set skip validation property to true.


I will illustrate different value of skip validation property
a- skip validation = true
    will bypass the ADF Model validation.
    the validation happens only when you commit the transaction.

b- skip validation = custom
     at that case I will use customValidator from java bean to control the validation.




c- skip validation = skipDataControls
That means that it will skip data control level only.

d- skip validation = false
 That it is the default value that doesn't allow skipping validation

Thanks
Mahmoud A. El-Sayed

5 comments:

  1. Thanks Mahmoud that was really helpful
    Hichem
    From Tunisia

    ReplyDelete
  2. Hello Mahmod,
    Do you know how to change the skipValidation property programmatically?

    ReplyDelete
    Replies
    1. Dear Mohammed,
      You ask good question.
      You can use setSkipValidation method in DCBindingContainer class

      Delete
  3. Hi,
    I was trying to implement this skipValidation property in my application. But somehow the property doesn't get saved. everytime i open the properties again after saving the property skipValidation gets set to default(false). Any idea where can i set it in the source code

    ReplyDelete

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...