In this example only text is displayed on the progress bar.
The following is an example of how to use the PL/SQL API inside a page process :
declare
l_processname varchar2(128 char) := 'PROCESS_01';
begin
UC_PROGRESSBAR_PKG.start_process(p_process_name => l_processname,
p_maxval => 100,
p_process_text => 'Starting');
for i in 1..5
loop
if i = 1
then
UC_PROGRESSBAR_PKG.set_status(p_process_name => l_processname,
p_value => i*20,
p_process_text => 'Making backup');
elsif i = 2
then
UC_PROGRESSBAR_PKG.set_status(p_process_name => l_processname,
p_value => i*20,
p_process_text => 'Getting data');
elsif i = 3
then
UC_PROGRESSBAR_PKG.set_status(p_process_name => l_processname,
p_value => i*20,
p_process_text => 'Processing');
elsif i = 4
then
UC_PROGRESSBAR_PKG.set_status(p_process_name => l_processname,
p_value => i*20,
p_process_text => 'Finishing');
elsif i = 5
then
UC_PROGRESSBAR_PKG.set_status(p_process_name => l_processname,
p_value => i*20,
p_process_text => 'Clean up');
sys.DBMS_SESSION.sleep(2);
end if;
end loop;
UC_PROGRESSBAR_PKG.stop_process(p_process_name => l_processname);
end;
Text options for the plug-in are set inside "JavaScript Initialization Code". With the "textTemplate" style option text otput template can be defined to display only text messages.
function( pOptions ) {
pOptions.style.textTemplate = "%2";
pOptions.style.completeText = "Completed!";
return pOptions;
}