Wednesday, September 9, 2009

How to skip entity level validations until the transaction is submtted?

When there are entity level validations in your EO, those validations get fired in your pages for every action say for example, on switching a tab or clicking on a button etc. But, many times you want to prevent these validations until you submit the transaction. i.e., you want to get these validations only when you're submitting/committing the transaction.

For that, you need to goto the page definition of main jspx page(if you're having jsff pages, there will be one main jspx that contains the template i.e, that accommodates these jsffs) and then, in the main tag, add property skipValidation='true'. This will suppress all entity level validations until u submit the transaction. And, all attribute level validations will be working as it is. Example pageDefinition tag is given below:

<pagedefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"> version="11.1.1.54.7" id="CarDecorsHomePageDef" Package="com.mpapana.cardecors.ui.page" SkipValidation="true"> </pagedefinition>

2 comments:

Related Posts with Thumbnails