« JDeveloper 11 – InputDate: How-to set the default year in the date popup | Main | How-to cancel an edit form, undoing the edits with ADFm Save points »
ADF Faces RC: How-to cancel an edit form, undoing the edits
By frank.nimphius | December 23, 2008
Two strategies exist to implement a cancel button for an ADF Faces / ADF edit form that uses client-side and server side validation: a) a bounded taskflow restoring the previous state with a declarative savepoint and b) a client Java method exposed on the ADF Business Component business service. Both strategies are similar in that they use the immediate property on a ADF Faces command button to cancel the edit, but are different in their implementation of the data clean-up. When discussing the problem with Steve Muench, he came up with the the declarative approach that uses a bounded taskflow to clean up the data modification when cancel is pressed. Its a straight forward approach that is easy understand and implement. Especially when re-use is not a requirement, the declarative feature might be seen to complex for such a little functionality, which is why in this how-to document we document the simpler Java version as well. This how-to document describes one of the two options available to cancel an edit form in ADF Faces RC without a required field message being raised by the client validator. Canceling an edit form with ADF requires more than just setting the immediate property set to true on the command button. It requires some housekeeping for the changes performed on the ADF binding layer.
Topics: ADF Faces RC | No Comments »
Comments are closed.
