A classic report in APex can be refreshed dynamically. A pl/sql region is more difficult, you must do this by using an application proces.
- Create a plsql region calling a procedure/package with htp.p-commands. IE <div id=HK3>xcvxvxvxvc</div>
BEGIN
show_data;
END;
- create a application process (refresh_data)
DECLARE
l_param1 varchar2(100);
BEGIN
l_param1:= apex_application.g_x01;
htp.p(‘Parameter’||l_param1);
show_data;
END;
- Put javascript in header page (#HK3 is unique id of ie DIV which containts ALL the data)
<script type=”text/javascript”>
var sIntervalId = setInterval(function(){
apex.server.process (
‘refresh_data’
,{x01:apex.item(“P3_NEW”).getValue()}
,{dataType:”text”
, success: function(pData) {
$(“#HK3”).replaceWith(pData);
}
}
);}, 5000);
</script>
So, now the PLSQL-region will be refreshed every 5 seconds. Sending parameters to the package/process can be done by pageitems/X01 etc.