Shay Shmeltzer's Oracle Development Tools Tips

Warning of Uncommitted/Unsaved Changes in ADF Faces Pages

Shay Shmeltzer
Director of Product Management - Oracle

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.

Join the discussion

Comments ( 2 )
  • JayJay Tuesday, October 25, 2011

    Hi Shay,

    This is only good if users are ok with the plain style javascript-type notification. I know it's currently not available now, but would expect the ADF popup can replace it since we can customize the message and also make the BLAF consistent across multiple browser types.

  • sri Thursday, November 10, 2011

    Hi Shay,

    This was very usefull information. But i have one question, can you use same type of alter from moving one tab to another tab nothing but one jsff to another jsff.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.