Warning of Uncommitted/Unsaved Changes in ADF Faces Pages
By Shay Shmeltzer-Oracle on Oct 13, 2011
Ever wondered how to notify users of your ADF Faces application that they have uncommitted changes on their ADF page before they go off and check their facebook page (or just close the browser's tab)?
Well there is a little nifty feature in ADF Faces that makes this trivial - the uncommittedDataWarning property of your af:document tag.
I don't remember at which specific version of JDeveloper this feature was added, but a quick google for "unsaved changes in ADF" brought up some older solutions and I figured I'll raise the awareness of this relatively newer feature with a little video.
By the way there is a longer explanation of this un-saved changes feature in relation to bounded taskflows here.
Another thing I show in the video is something that often causes newbies to stumble - and that's the reason why commit/rollback are not enabled on your page. This is somewhat related and it depends on the EL used for their disabled property. In the past this EL was a handy thing that people used to implement this type of validation check on whether the page contained changes. For newbies - one thing you can always do if you want the commit button to be enabled always is just remove the EL from the disabled property and you'll get back the "false" default value and the button would be clickable regardless of changes in the page.