Hi,
This a very newbie
post that will help new ADF Developers.
In ADF we use component validator to validate any value that Is being posted in
the binding layer. This is a very effective way to avoid any garbage post in
the Application.
During the
development we face many challenges and to meet those challenges we do
different types of things. Sometimes we write codes at inappropriate
places which in turn puts an adverse effect on the Applications performance.
So
here are few of the things that should not be done in a Validator of a Component in ADF.
- Never use the validator to validate the Mandatory field. This is because the validator doesn’t get fired in case of a null value in the component. So sometimes people are expecting a validation in case of null value and it doesn't get fired.
- Never use database function to do CRUD operation or any kind of CRUD Operation in the Application in a Validator because the Validator runs every time the data is being posted in the binding layer and the update will run many times which will have a negative impact on the database and Application performance.
- Never use processUpdates inside a Validator ProcessUpdate updates the value of the component in the binding layer which will actually defeat the purpose of the validator.
Thanks.