Monday, January 31, 2011

ADF 11g PS3 : Check Uncommitted Data Behavior

In ADF 11g PS 3 ( there is a nice little feature that you can use to prevent users to leave a page when there is uncommitted data. It is called "Check Uncommitted Data Behavior" and can be used on all action components. Using it is very easy. You just drop the component from the data control pallet onto your page as a child of a command component.

The component is added to the page resulting in the following code.

Finally, you have to tell the ADF Document component that it should implement the uncommitted data warning.

When you run the page, change data, and push the button you will get a message. This will also work when navigating away from the page, refreshing the page and even when closing the browser.

Simple but useful !