Undo Edits in Jdev 11g One of the most important use case in an application is to undo the edit changes

. It means if user chooses to create a new record and later cancel the creation process, we have to delete the empty row created in view object. Or opens up edit form and cancel the changes done; view object row needs to be refreshed and changes done needs to be undone. An easy way to achieve the same is to create a new attribute in your entity based view object say “IsNewRow” with type string.

Then you must generate the custom view row Impl class of your view object in which you have added the new attribute. Add following code in your row impl class and modify the getting method of the IsNewRow attribute.

Now once user will press the cancel button on your create or edit data page, you can write relevant code in your backing bean to cancel the changes as

References:http://oracle.com/technology/products/jdev/tips/fnimphius/cancelForm/cancelForm.html

Sign up to vote on this title
UsefulNot useful