Friday, November 25, 2011

ADF: New client behavior tag - af:checkUncommittedDataBehavior


In Oracle JDeveloper 11.1.2, a new client behavior tag af:checkUncommittedDataBehavior is provided to check for uncommitted data when navigating away from a page using a command button that has its immediate property set to true. The tag can be applied as a child of any command component, like
  • af:commandButton
  • af:commandLink
  • af:commandMenuItem
  • af:commandToolbarButton

For the client behavior to work, you must set the document tag's uncommittedDataWarning attribute to on, see more here.

Just as a reminder: Client behavior tags in ADF Faces execute on the client side. They are there to save you from writing JavaScript, thus abstracting you from the complexity of the underlying client side APIs.