Skip to Main Content
  • Questions
  • Notifications on Apex page using triggers

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, ASHISH.

Asked: February 14, 2016 - 8:54 am UTC

Last updated: February 15, 2016 - 6:24 am UTC

Version: V1

Viewed 1000+ times

You Asked

Can we Refresh a Apex page using Triggeres?

and Connor said...

I am assuming that you mean something along the lines of a change occcurs in the database, a database trigger fires, and an apex application gets notified in some way and refreshes its screen?

If thats the case, then there does not appear to be a native way in Apex to do that.

I asked some Apex people on ideas to do it - some of their input paraphrased below:

In web apps, generally speaking, we need to use web sockets to push data from the server to the client so you’d have to place a web server that supports this in front of ORDS, for example, Node4ORDS ( https://github.com/OraOpenSource/node4ords )

Then you could use CQN to push from DB to Node.js. See https://jsao.io/2015/02/real-time-data-with-node-js-socket-io-and-oracle-database/ for some details on this.


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Notification Using Trigger on Apex page

Ashish Sahay, February 15, 2016 - 5:05 am UTC

Hey,
I just need a notification on apex page when the entry inserted into the database weather it is using back end or weather it is from apex page.


Connor McDonald
February 15, 2016 - 6:24 am UTC

And I answered along those lines.

Apex does not know if a database value has changed, unless it goes back to the database and actually queries that data.

If you want the database to be able to "send a signal" to an Apex application that the data has changed, then see the original answer.

Otherwise, your Apex app would need to poll the database intermittently.


More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library