Displaying Transaction Log When User Commits a Transaction

I'm attaching a simple example that illustrates a possible solution to display number of rows(new, modified,  deleted) posted to database when user commits transaction.

This example overrides EntityImpl::doDML(int operation, TransactionEvent e) method to track the status of entities and save the log in UserData hash table object from the DBTransaction. The custom AppModuleImpl::commitTransactionWithStatusLog() does the commit and returns the transaction log as Map to the client which is displayed on the UI in the 'statusbar' facet for the table(wrapped by af:panelCollection). If you are interested, take a look at the custom variable binding in the page definition file in the attached sample. This basically does the wiring job  for the returned Map by commitTransactionWithStatusLog() method. May be useful for you later :)


Download

You can download the sample workspace from here. [Runs with Oracle JDeveloper 11.1.2.1.0 (11g R2PS1) + HR Schema]

How to run this sample?

1. Run test.jsf
2. Modify rows on the table and click on 'Commit Transaction With Status Log'. Application displays transaction status (rows modified, deleted, inserted) in the status bar.

Comments

  1. Hi Jobinesh,

    Can you please tell me how the custom variable is added to the executable section?

    ReplyDelete
  2. Thanks Jobinesh..
    I see that the EL uses '$'. I found that '$' is used in the case of immediate evaluation and '#' is used in the case of deferred evaluation. Also i saw the below links
    https://blogs.oracle.com/learnwithpavan/entry/difference_between_and_in_adfj

    http://java.sun.com/products/jsp/reference/techart/unifiedEL.html

    I just need to know immediate in the sense which phase it gets evaluated and how does it differ from deferred evaluation.

    ReplyDelete

Post a Comment