├── .gitignore
├── LICENSE
├── README.md
├── apexplugin.json
├── plugin-preview.png
├── plugin
└── dynamic_action_plugin_com_apexutils_execute_plsql_code.sql
└── src
├── js
└── script.js
└── plsql
└── render_ajax.sql
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | dist/*
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 APEX Utils
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # APEX Utils - Execute PL/SQL Code
2 | A more powerful Execute PL/SQL Code dynamic action. It includes declarative notifications for success and error, configurable spinners in case of longer processes & CLOB/ JSON support.
3 |
4 |    
5 |
6 | ## Demo App
7 | https://www.apexutils.com/
8 |
9 | ## Changelog
10 |
11 | #### 1.0.2 - Removed unnecessary \_clear function call and general code cleanup
12 | #### 1.0.1 - Added Plugin help text, added #SQLERRM_TEXT# substitution string
13 | #### 1.0.0 - Initial Release
14 |
15 | ## License
16 | MIT
17 |
--------------------------------------------------------------------------------
/apexplugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "APEX Utils - Execute PL/SQL Code",
3 | "version" : "1.0.2",
4 | "description" : "A more powerful Execute PL/SQL Code dynamic action. It includes declarative notifications for success and error, configurable spinners in case of longer processes & CLOB/ JSON support.
Short info about \"Commercially Supported\"
This plug-in remains free and open source under MIT license!
If you have any problems with it, you can always create an issue on GitHub and I may find the time at some point in the future to resolve it for you. The guys at FOEX also offer commercial support for this plug-in. They have added this plug-in as a part of their \"APEX Plug-in Support Package\", for more information please visit: https://www.foex.at/plugin-support. I have opted to include my plug-in in their support package because you can get professional support for any issues you face in a timely manner as well as the \"peace of mind\" that it will be supported for many years to come!
",
5 | "keywords" : ["execute plsql", "notifications", "clob", "spinner"],
6 | "homepage" : "https://github.com/apexutils/Execute-PL-SQL-Code",
7 | "license" : "MIT",
8 | "commercial": "No",
9 | "commercially_supported": "Yes",
10 | "author" : {
11 | "name" : "Stefan Dobre",
12 | "email" : "apexutils@gmail.com",
13 | "url" : "https://www.apexutils.com"
14 | },
15 | "repository" : {
16 | "type" : "git",
17 | "url" : "https://github.com/apexutils/Execute-PL-SQL-Code"
18 | },
19 | "oracle" : {
20 | "versions" : ["11.2.0.1", "12.1.0.1", "12.2.0.1", "18.1.0", "19.1.0"],
21 | "apex" : {
22 | "versions" : ["18.2.0", "19.1.0", "19.2.0"],
23 | "plugin" : {
24 | "internalName" : "COM.APEXUTILS.EXECUTE_PLSQL_CODE",
25 | "type" : "dynamic action",
26 | "demo" : "https://www.apexutils.com",
27 | "previewImage" : "https://raw.githubusercontent.com/apexutils/Execute-PL-SQL-Code/master/plugin-preview.png"
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/plugin-preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apexutils/Execute-PL-SQL-Code/231ec7b0b9b65d1a668816c674792d4633d7c786/plugin-preview.png
--------------------------------------------------------------------------------
/plugin/dynamic_action_plugin_com_apexutils_execute_plsql_code.sql:
--------------------------------------------------------------------------------
1 | prompt --application/set_environment
2 | set define off verify off feedback off
3 | whenever sqlerror exit sql.sqlcode rollback
4 | --------------------------------------------------------------------------------
5 | --
6 | -- ORACLE Application Express (APEX) export file
7 | --
8 | -- You should run the script connected to SQL*Plus as the Oracle user
9 | -- APEX_180200 or as the owner (parsing schema) of the application.
10 | --
11 | -- NOTE: Calls to apex_application_install override the defaults below.
12 | --
13 | --------------------------------------------------------------------------------
14 | begin
15 | wwv_flow_api.import_begin (
16 | p_version_yyyy_mm_dd=>'2018.05.24'
17 | ,p_release=>'18.2.0.00.12'
18 | ,p_default_workspace_id=>1549777203957536
19 | ,p_default_application_id=>100
20 | ,p_default_owner=>'APEX_UTILS'
21 | );
22 | end;
23 | /
24 | prompt --application/shared_components/plugins/dynamic_action/com_apexutils_execute_plsql_code
25 | begin
26 | wwv_flow_api.create_plugin(
27 | p_id=>wwv_flow_api.id(1843861354211161477)
28 | ,p_plugin_type=>'DYNAMIC ACTION'
29 | ,p_name=>'COM.APEXUTILS.EXECUTE_PLSQL_CODE'
30 | ,p_display_name=>'APEX Utils - Execute PL/SQL Code'
31 | ,p_category=>'MISC'
32 | ,p_supported_ui_types=>'DESKTOP:JQM_SMARTPHONE'
33 | ,p_javascript_file_urls=>'#PLUGIN_FILES#js/script#MIN#.js'
34 | ,p_plsql_code=>wwv_flow_string.join(wwv_flow_t_varchar2(
35 | 'function render',
36 | ' ( p_dynamic_action in apex_plugin.t_dynamic_action',
37 | ' , p_plugin in apex_plugin.t_plugin',
38 | ' )',
39 | 'return apex_plugin.t_dynamic_action_render_result',
40 | 'is',
41 | ' l_result apex_plugin.t_dynamic_action_render_result;',
42 | ' ',
43 | ' --attribute_01 is the plsql code. not needed in the render function',
44 | ' ',
45 | ' l_items_to_submit varchar2(4000) := apex_plugin_util.item_names_to_jquery(p_dynamic_action.attribute_02, p_dynamic_action);',
46 | ' l_items_to_return varchar2(4000) := apex_plugin_util.item_names_to_jquery(p_dynamic_action.attribute_03, p_dynamic_action);',
47 | ' ',
48 | ' --attribute_04 is the success message. not needed in the render function',
49 | ' --attribute_05 is the error message. not needed in the render function',
50 | '',
51 | ' l_loader varchar2(4000) := p_dynamic_action.attribute_06;',
52 | ' l_loader_position varchar2(4000) := p_dynamic_action.attribute_07;',
53 | ' ',
54 | ' l_submit_clob varchar2(4000) := p_dynamic_action.attribute_08;',
55 | ' l_submit_clob_item varchar2(4000) := p_dynamic_action.attribute_09;',
56 | ' l_submit_clob_variable varchar2(4000) := p_dynamic_action.attribute_10;',
57 | ' ',
58 | ' l_return_clob varchar2(4000) := p_dynamic_action.attribute_11;',
59 | ' l_return_clob_item varchar2(4000) := p_dynamic_action.attribute_12;',
60 | ' l_return_clob_variable varchar2(4000) := p_dynamic_action.attribute_13;',
61 | '',
62 | ' --extra options',
63 | ' l_suppress_change_event boolean := instr(p_dynamic_action.attribute_15, ''suppressChangeEvent'') > 0;',
64 | ' l_show_error_as_alert boolean := instr(p_dynamic_action.attribute_15, ''showErrorAsAlert'') > 0;',
65 | ' l_sync boolean := apex_application.g_compatibility_mode < 5.1;',
66 | '',
67 | 'begin',
68 | '',
69 | ' l_result.javascript_function := ''apexutils.executePlSqlCode'';',
70 | ' l_result.ajax_identifier := apex_plugin.get_ajax_identifier;',
71 | ' ',
72 | ' if apex_application.g_debug then',
73 | ' apex_plugin_util.debug_dynamic_action',
74 | ' ( p_plugin => p_plugin',
75 | ' , p_dynamic_action => p_dynamic_action',
76 | ' );',
77 | ' end if;',
78 | ' ',
79 | ' --attribute_01: regular items to submit/return',
80 | ' l_result.attribute_01 := ''{'' || apex_javascript.add_attribute( ''itemsToSubmit'', l_items_to_submit, false )',
81 | ' || apex_javascript.add_attribute( ''itemsToReturn'', l_items_to_return, false, false ) ||',
82 | ' ''}'';',
83 | '',
84 | ' --attribute_02: loader',
85 | ' l_result.attribute_02 := ''{'' || apex_javascript.add_attribute( ''showLoader'' , l_loader is not null, false)',
86 | ' || apex_javascript.add_attribute( ''loaderType'' , l_loader , false)',
87 | ' || apex_javascript.add_attribute( ''loaderPosition'', l_loader_position , false, false) ||',
88 | ' ''}'';',
89 | ' ',
90 | ' --attribute_03: clob to submit/return',
91 | ' l_result.attribute_03 := ''{'' || apex_javascript.add_attribute( ''submitClob'' , l_submit_clob is not null, false)',
92 | ' || apex_javascript.add_attribute( ''submitClobFrom'' , l_submit_clob)',
93 | ' || apex_javascript.add_attribute( ''submitClobItem'' , l_submit_clob_item)',
94 | ' || apex_javascript.add_attribute( ''submitClobVariable'', l_submit_clob_variable)',
95 | ' || apex_javascript.add_attribute( ''returnClob'' , l_return_clob is not null, false)',
96 | ' || apex_javascript.add_attribute( ''returnClobInto'' , l_return_clob)',
97 | ' || apex_javascript.add_attribute( ''returnClobItem'' , l_return_clob_item)',
98 | ' || apex_javascript.add_attribute( ''returnClobVariable'', l_return_clob_variable, false, false) ||',
99 | ' ''}'';',
100 | ' ',
101 | ' --attribute_05: extra options',
102 | ' l_result.attribute_05 := ''{'' || apex_javascript.add_attribute(''suppressChangeEvent'', l_suppress_change_event, false)',
103 | ' || apex_javascript.add_attribute(''showErrorAsAlert'' , l_show_error_as_alert , false)',
104 | ' || apex_javascript.add_attribute(''sync'' , l_sync , false, false) ||',
105 | ' ''}'';',
106 | '',
107 | ' return l_result;',
108 | 'end render;',
109 | '',
110 | 'function ajax',
111 | ' ( p_dynamic_action in apex_plugin.t_dynamic_action',
112 | ' , p_plugin in apex_plugin.t_plugin',
113 | ' )',
114 | 'return apex_plugin.t_dynamic_action_ajax_result',
115 | 'is',
116 | ' l_statement varchar2(32767) := p_dynamic_action.attribute_01;',
117 | ' l_items_to_return varchar2(4000) := apex_plugin_util.cleanup_item_names(p_dynamic_action.attribute_03);',
118 | ' ',
119 | ' l_return_clob boolean := p_dynamic_action.attribute_11 is not null;',
120 | ' ',
121 | ' l_success_message varchar2(4000) := p_dynamic_action.attribute_04;',
122 | ' l_error_message varchar2(4000) := p_dynamic_action.attribute_05;',
123 | ' ',
124 | ' l_message varchar2(4000);',
125 | '',
126 | ' l_item_names apex_application_global.vc_arr2;',
127 | ' ',
128 | ' l_result apex_plugin.t_dynamic_action_ajax_result;',
129 | '',
130 | 'begin',
131 | ' ',
132 | ' apex_plugin_util.execute_plsql_code(l_statement);',
133 | '',
134 | ' apex_json.initialize_output;',
135 | ' apex_json.open_object;',
136 | '',
137 | ' if l_items_to_return is not null then',
138 | ' l_item_names := apex_util.string_to_table( p_string => l_items_to_return',
139 | ' , p_separator => '',''',
140 | ' );',
141 | ' apex_json.open_array(''items'');',
142 | ' ',
143 | ' for i in 1 .. l_item_names.count loop',
144 | ' apex_json.open_object;',
145 | ' apex_json.write',
146 | ' ( p_name => ''id''',
147 | ' , p_value => apex_plugin_util.item_names_to_dom',
148 | ' ( p_item_names => l_item_names(i)',
149 | ' , p_dynamic_action => p_dynamic_action',
150 | ' )',
151 | ' );',
152 | ' apex_json.write(''value'', V( l_item_names(i)) );',
153 | ' apex_json.close_object;',
154 | ' end loop;',
155 | '',
156 | ' apex_json.close_array;',
157 | ' end if;',
158 | ' ',
159 | ' if l_return_clob then',
160 | ' apex_json.write(''clob'', apex_application.g_clob_01);',
161 | ' end if;',
162 | ' ',
163 | ' apex_json.write(''status'', ''success'');',
164 | ' ',
165 | ' l_message := case ',
166 | ' when apex_application.g_x01 is not null ',
167 | ' then apex_application.g_x01 ',
168 | ' else l_success_message ',
169 | ' end;',
170 | ' apex_json.write(''message'', l_message);',
171 | ' ',
172 | ' apex_json.close_object;',
173 | '',
174 | ' return l_result;',
175 | '',
176 | 'exception when others then',
177 | ' rollback;',
178 | ' ',
179 | ' apex_json.initialize_output;',
180 | ' apex_json.open_object;',
181 | ' apex_json.write(''status'', ''error'');',
182 | ' ',
183 | ' l_message := case ',
184 | ' when apex_application.g_x02 is not null ',
185 | ' then apex_application.g_x02 ',
186 | ' else l_error_message ',
187 | ' end;',
188 | ' ',
189 | ' l_message := replace(l_message, ''#SQLCODE#'' , apex_escape.html(SQLCODE));',
190 | ' l_message := replace(l_message, ''#SQLERRM#'' , apex_escape.html(SQLERRM));',
191 | ' l_message := replace(l_message, ''#SQLERRM_TEXT#'', apex_escape.html(substr(SQLERRM, instr(SQLERRM, '':'')+1)));',
192 | ' ',
193 | ' apex_json.write(''message'', l_message);',
194 | ' ',
195 | ' apex_json.close_object;',
196 | ' ',
197 | ' return l_result;',
198 | 'end ajax;'))
199 | ,p_api_version=>1
200 | ,p_render_function=>'render'
201 | ,p_ajax_function=>'ajax'
202 | ,p_standard_attributes=>'STOP_EXECUTION_ON_ERROR:WAIT_FOR_RESULT'
203 | ,p_substitute_attributes=>true
204 | ,p_subscribe_plugin_settings=>true
205 | ,p_help_text=>'Executes PL/SQL code on the server.'
206 | ,p_version_identifier=>'1.0.2'
207 | ,p_about_url=>'https://www.apexutils.com'
208 | ,p_files_version=>9
209 | );
210 | wwv_flow_api.create_plugin_attribute(
211 | p_id=>wwv_flow_api.id(1843862265209183553)
212 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
213 | ,p_attribute_scope=>'COMPONENT'
214 | ,p_attribute_sequence=>1
215 | ,p_display_sequence=>10
216 | ,p_prompt=>'PL/SQL Code'
217 | ,p_attribute_type=>'PLSQL'
218 | ,p_is_required=>true
219 | ,p_is_translatable=>false
220 | ,p_examples=>wwv_flow_string.join(wwv_flow_t_varchar2(
221 | '',
222 | 'begin',
223 | ' setCommission(:P1_SAL, :P1_JOB);',
224 | 'end;',
225 | '
',
226 | 'In this example, you need to enter P1_SAL,P1_JOB
in Page Items to Submit.
'))
227 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
228 | 'Specify an execution only PL/SQL anonymous block, that is executed on the server.
',
229 | 'You can reference other page or application items from within your application using bind syntax (for example :P1_MY_ITEM
). Any items referenced also need to be included in Page Items to Submit.
'))
230 | );
231 | wwv_flow_api.create_plugin_attribute(
232 | p_id=>wwv_flow_api.id(1843862867071193608)
233 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
234 | ,p_attribute_scope=>'COMPONENT'
235 | ,p_attribute_sequence=>2
236 | ,p_display_sequence=>20
237 | ,p_prompt=>'Items to Submit'
238 | ,p_attribute_type=>'PAGE ITEMS'
239 | ,p_is_required=>false
240 | ,p_is_translatable=>false
241 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
242 | 'Enter the uppercase page items submitted to the server, and therefore, available for use within your PL/SQL Code.
',
243 | 'You can type in the item name or pick from the list of available items.',
244 | 'If you pick from the list and there is already text entered then a comma is placed at the end of the existing text, followed by the item name returned from the list.
'))
245 | );
246 | wwv_flow_api.create_plugin_attribute(
247 | p_id=>wwv_flow_api.id(920418153318418907)
248 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
249 | ,p_attribute_scope=>'COMPONENT'
250 | ,p_attribute_sequence=>3
251 | ,p_display_sequence=>30
252 | ,p_prompt=>'Items to Return'
253 | ,p_attribute_type=>'PAGE ITEMS'
254 | ,p_is_required=>false
255 | ,p_is_translatable=>false
256 | ,p_examples=>wwv_flow_string.join(wwv_flow_t_varchar2(
257 | '',
258 | ' apex_util.set_session_state(''P1_MY_ITEM'', ''New Value'');',
259 | '
',
260 | '',
261 | 'In this example, enter P1_MY_ITEM
in this attribute in order for ''New Value'' to be displayed in that item on your page.
'))
262 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
263 | 'Enter the uppercase page items set when the call to the server returns, based on their current value in session state. If your PL/SQL Code sets one or more page item values in session state you need to define those items in this a'
264 | ||'ttribute.
',
265 | 'You can type in the item name or pick from the list of available items.',
266 | 'If you pick from the list and there is already text entered then a comma is placed at the end of the existing text, followed by the item name returned from the list.
'))
267 | );
268 | wwv_flow_api.create_plugin_attribute(
269 | p_id=>wwv_flow_api.id(23016235130369602)
270 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
271 | ,p_attribute_scope=>'COMPONENT'
272 | ,p_attribute_sequence=>4
273 | ,p_display_sequence=>40
274 | ,p_prompt=>'Success Message'
275 | ,p_attribute_type=>'TEXT'
276 | ,p_is_required=>false
277 | ,p_is_translatable=>true
278 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
279 | 'Provide a success message which will be displayed as a green alert if the execution is completed successfully.
',
280 | 'This message can be dynamically overridden in the PL/SQL Code block by assigning the new value to the apex_application.g_x01 global variable.
',
281 | 'apex_application.g_x01 := ''New Success Message'';
',
282 | 'If no success message is provided, none will be shown.
'))
283 | );
284 | wwv_flow_api.create_plugin_attribute(
285 | p_id=>wwv_flow_api.id(23022176483371112)
286 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
287 | ,p_attribute_scope=>'COMPONENT'
288 | ,p_attribute_sequence=>5
289 | ,p_display_sequence=>50
290 | ,p_prompt=>'Error Message'
291 | ,p_attribute_type=>'TEXT'
292 | ,p_is_required=>false
293 | ,p_default_value=>'#SQLERRM#'
294 | ,p_is_translatable=>true
295 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
296 | 'Provide an error message which will be displayed as a warning notification if the execution is completed unsuccessfully.
',
297 | 'This message can be dynamically overridden in the PL/SQL Code block by assigning the new value to the apex_application.g_x02
global variable.
',
298 | 'apex_application.g_x02 := ''New Error Message'';
',
299 | 'If no error message is provided, none will be shown.
',
300 | 'You can also use the #SQLCODE#, #SQLERRM# and #SQLERRM_TEXT# substitution strings for more detailed error information.
',
301 | 'By default the error message will be displayed in the top right corner as a notification. If you wish to display it as an alert, tick the Show "Error as Alert" checkbox.
'))
302 | );
303 | wwv_flow_api.create_plugin_attribute(
304 | p_id=>wwv_flow_api.id(23078692591772342)
305 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
306 | ,p_attribute_scope=>'COMPONENT'
307 | ,p_attribute_sequence=>6
308 | ,p_display_sequence=>60
309 | ,p_prompt=>'Loader'
310 | ,p_attribute_type=>'SELECT LIST'
311 | ,p_is_required=>false
312 | ,p_default_value=>'spinner'
313 | ,p_is_translatable=>false
314 | ,p_lov_type=>'STATIC'
315 | ,p_null_text=>'None'
316 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
317 | 'Provide the type of Loader to be displayed while waiting for the execution to complete.
',
318 | 'This helps inform the user that something is going on in case of longer processes.
',
319 | 'Spinner is displayed as the default application spinner.
',
320 | 'Spinner & Overlay will add a translucent overlay behind the spinner to discourage the user from performing other actions while the AJAX call is in progress. Note that this will not stop actions performed via the keyboard.
',
321 | 'To avoid flickering, the spinner will only be shown if the AJAX call takes longer than 200ms, and will always show for at least 800ms.
'))
322 | );
323 | wwv_flow_api.create_plugin_attr_value(
324 | p_id=>wwv_flow_api.id(23090083113777277)
325 | ,p_plugin_attribute_id=>wwv_flow_api.id(23078692591772342)
326 | ,p_display_sequence=>10
327 | ,p_display_value=>'Spinner'
328 | ,p_return_value=>'spinner'
329 | );
330 | wwv_flow_api.create_plugin_attr_value(
331 | p_id=>wwv_flow_api.id(23090413017779160)
332 | ,p_plugin_attribute_id=>wwv_flow_api.id(23078692591772342)
333 | ,p_display_sequence=>20
334 | ,p_display_value=>'Spinner & Overlay'
335 | ,p_return_value=>'spinnerandoverlay'
336 | );
337 | wwv_flow_api.create_plugin_attribute(
338 | p_id=>wwv_flow_api.id(23090864422813691)
339 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
340 | ,p_attribute_scope=>'COMPONENT'
341 | ,p_attribute_sequence=>7
342 | ,p_display_sequence=>70
343 | ,p_prompt=>'Loader Position'
344 | ,p_attribute_type=>'TEXT'
345 | ,p_is_required=>true
346 | ,p_default_value=>'body'
347 | ,p_is_translatable=>false
348 | ,p_depending_on_attribute_id=>wwv_flow_api.id(23078692591772342)
349 | ,p_depending_on_has_to_exist=>true
350 | ,p_depending_on_condition_type=>'NOT_NULL'
351 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
352 | 'Provide the position of the spinner as a jQuery selector.
',
353 | 'body will be desired in most cases, but specific requirements can also be achieved. For example, you can give a region a static ID of regionId, and then reference it as #regionId.
',
354 | 'Note that the spinner will be positioned at the center of said region, and scroll appropriately. The only exception is in the case of body, when the spinner will be positioned at the middle of the visible screen, and stay there despite any '
355 | ||'scrolling.
'))
356 | );
357 | wwv_flow_api.create_plugin_attribute(
358 | p_id=>wwv_flow_api.id(23131913878970506)
359 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
360 | ,p_attribute_scope=>'COMPONENT'
361 | ,p_attribute_sequence=>8
362 | ,p_display_sequence=>80
363 | ,p_prompt=>'Submit CLOB'
364 | ,p_attribute_type=>'SELECT LIST'
365 | ,p_is_required=>false
366 | ,p_is_translatable=>false
367 | ,p_lov_type=>'STATIC'
368 | ,p_null_text=>'No'
369 | ,p_help_text=>'Values submitted to the server in APEX page items can have a maximum length of 4000 characters. If you need to submit values larger than that, specify here the source, and the value will be made available to you via the apex_application.g_cl'
370 | ||'ob_01
global variable in your PL/SQL code block. From there, you can modify the value, store it in a table or collection, etc.
'
371 | );
372 | wwv_flow_api.create_plugin_attr_value(
373 | p_id=>wwv_flow_api.id(23137818249981245)
374 | ,p_plugin_attribute_id=>wwv_flow_api.id(23131913878970506)
375 | ,p_display_sequence=>10
376 | ,p_display_value=>'From Page Item'
377 | ,p_return_value=>'pageitem'
378 | );
379 | wwv_flow_api.create_plugin_attr_value(
380 | p_id=>wwv_flow_api.id(23138291806985669)
381 | ,p_plugin_attribute_id=>wwv_flow_api.id(23131913878970506)
382 | ,p_display_sequence=>20
383 | ,p_display_value=>'From JavaScript Variable'
384 | ,p_return_value=>'javascriptvariable'
385 | );
386 | wwv_flow_api.create_plugin_attribute(
387 | p_id=>wwv_flow_api.id(23144134510050421)
388 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
389 | ,p_attribute_scope=>'COMPONENT'
390 | ,p_attribute_sequence=>9
391 | ,p_display_sequence=>90
392 | ,p_prompt=>'Submit From'
393 | ,p_attribute_type=>'PAGE ITEM'
394 | ,p_is_required=>true
395 | ,p_is_translatable=>false
396 | ,p_depending_on_attribute_id=>wwv_flow_api.id(23131913878970506)
397 | ,p_depending_on_has_to_exist=>true
398 | ,p_depending_on_condition_type=>'EQUALS'
399 | ,p_depending_on_expression=>'pageitem'
400 | ,p_help_text=>'Specify the page item whose value will be loaded into the apex_application.g_clob_01
global variable.
'
401 | );
402 | wwv_flow_api.create_plugin_attribute(
403 | p_id=>wwv_flow_api.id(23150044974055140)
404 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
405 | ,p_attribute_scope=>'COMPONENT'
406 | ,p_attribute_sequence=>10
407 | ,p_display_sequence=>100
408 | ,p_prompt=>'Submit From'
409 | ,p_attribute_type=>'TEXT'
410 | ,p_is_required=>true
411 | ,p_is_translatable=>false
412 | ,p_depending_on_attribute_id=>wwv_flow_api.id(23131913878970506)
413 | ,p_depending_on_has_to_exist=>true
414 | ,p_depending_on_condition_type=>'EQUALS'
415 | ,p_depending_on_expression=>'javascriptvariable'
416 | ,p_examples=>'nameSpace.largeString
'
417 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
418 | 'Specify the name of the JavaScript variable to be loaded into the apex_application.g_clob_01
global variable.
',
419 | 'If the variable is a JSON, it will be stringified.
',
420 | 'You do not have to prefix the variable with window.
'))
421 | );
422 | wwv_flow_api.create_plugin_attribute(
423 | p_id=>wwv_flow_api.id(23161722948061374)
424 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
425 | ,p_attribute_scope=>'COMPONENT'
426 | ,p_attribute_sequence=>11
427 | ,p_display_sequence=>110
428 | ,p_prompt=>'Return CLOB'
429 | ,p_attribute_type=>'SELECT LIST'
430 | ,p_is_required=>false
431 | ,p_is_translatable=>false
432 | ,p_lov_type=>'STATIC'
433 | ,p_null_text=>'No'
434 | ,p_help_text=>'If you set this option to anything other that "No", any content found in apex_application.g_clob_01
at the end of the PL/SQL execution will be loaded in the specified destination.
'
435 | );
436 | wwv_flow_api.create_plugin_attr_value(
437 | p_id=>wwv_flow_api.id(23167688768064560)
438 | ,p_plugin_attribute_id=>wwv_flow_api.id(23161722948061374)
439 | ,p_display_sequence=>10
440 | ,p_display_value=>'Into Page Item'
441 | ,p_return_value=>'pageitem'
442 | );
443 | wwv_flow_api.create_plugin_attr_value(
444 | p_id=>wwv_flow_api.id(23168054575070221)
445 | ,p_plugin_attribute_id=>wwv_flow_api.id(23161722948061374)
446 | ,p_display_sequence=>20
447 | ,p_display_value=>'Into JavaScript Variable'
448 | ,p_return_value=>'javascriptvariable'
449 | );
450 | wwv_flow_api.create_plugin_attr_value(
451 | p_id=>wwv_flow_api.id(23168468696072123)
452 | ,p_plugin_attribute_id=>wwv_flow_api.id(23161722948061374)
453 | ,p_display_sequence=>30
454 | ,p_display_value=>'Into JavaScript Variable as JSON'
455 | ,p_return_value=>'javascriptvariablejson'
456 | );
457 | wwv_flow_api.create_plugin_attribute(
458 | p_id=>wwv_flow_api.id(23168859243079331)
459 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
460 | ,p_attribute_scope=>'COMPONENT'
461 | ,p_attribute_sequence=>12
462 | ,p_display_sequence=>120
463 | ,p_prompt=>'Return Into'
464 | ,p_attribute_type=>'PAGE ITEM'
465 | ,p_is_required=>true
466 | ,p_is_translatable=>false
467 | ,p_depending_on_attribute_id=>wwv_flow_api.id(23161722948061374)
468 | ,p_depending_on_has_to_exist=>true
469 | ,p_depending_on_condition_type=>'EQUALS'
470 | ,p_depending_on_expression=>'pageitem'
471 | ,p_help_text=>'Specify a page item into which the value of apex_application.g_clob_01
will be loaded.
'
472 | );
473 | wwv_flow_api.create_plugin_attribute(
474 | p_id=>wwv_flow_api.id(23174734104085173)
475 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
476 | ,p_attribute_scope=>'COMPONENT'
477 | ,p_attribute_sequence=>13
478 | ,p_display_sequence=>130
479 | ,p_prompt=>'Return Into'
480 | ,p_attribute_type=>'TEXT'
481 | ,p_is_required=>true
482 | ,p_is_translatable=>false
483 | ,p_depending_on_attribute_id=>wwv_flow_api.id(23161722948061374)
484 | ,p_depending_on_has_to_exist=>true
485 | ,p_depending_on_condition_type=>'IN_LIST'
486 | ,p_depending_on_expression=>'javascriptvariable,javascriptvariablejson'
487 | ,p_examples=>wwv_flow_string.join(wwv_flow_t_varchar2(
488 | 'PL/SQL Code
',
489 | '',
490 | 'apex_json.initialize_clob_output;',
491 | 'apex_json.open_array;',
492 | '',
493 | 'for employee in (select * from emp)',
494 | 'loop',
495 | ' apex_json.open_object;',
496 | ' apex_json.write(''empno'', employee.empno);',
497 | ' apex_json.write(''empname'', employee.empname);',
498 | ' apex_json.close_object;',
499 | 'end loop;',
500 | '',
501 | 'apex_json.close_array;',
502 | 'apex_application.g_clob_01 := apex_json.get_clob_output;',
503 | 'apex_json.free_output;',
504 | '
',
505 | 'Return CLOB
',
506 | 'Into JavaScript Variable as JSON
',
507 | 'Return Into
',
508 | 'myApp.employees
',
509 | '',
510 | 'You can then reference this object in any JavaScript context on the page, usually in subsequent Execute Javascript dynamic actions.
'))
511 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
512 | 'Specify the JavaScript variable into which the value of apex_application.g_clob_01
will be loaded.
',
513 | 'If you chose Into JavaScript Variable the value will simply be loaded as a string.
',
514 | 'If you chose Into JavaScript Variable as JSON the value will be first parsed as JSON, then assigned to the variable.
',
515 | 'Note that you can specify any variable, even a nested one. If it doesn''t exist, it will be created.
'))
516 | );
517 | wwv_flow_api.create_plugin_attribute(
518 | p_id=>wwv_flow_api.id(22970414855488118)
519 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
520 | ,p_attribute_scope=>'COMPONENT'
521 | ,p_attribute_sequence=>15
522 | ,p_display_sequence=>150
523 | ,p_prompt=>'Options'
524 | ,p_attribute_type=>'CHECKBOXES'
525 | ,p_is_required=>false
526 | ,p_is_translatable=>false
527 | ,p_lov_type=>'STATIC'
528 | ,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
529 | 'Suppress Change Event
',
530 | 'Specify whether the change event is suppressed on the items specified in Page Items to Return. This prevents subsequent Change based Dynamic Actions from firing, for these items.
',
531 | 'Show Error as Alert
',
532 | 'By default, errors will be shown via apex.message.showErrors
as opposed to apex.message.alert
. If you wish to use the classic alert, tick this checkbox.
'))
533 | );
534 | wwv_flow_api.create_plugin_attr_value(
535 | p_id=>wwv_flow_api.id(22975951065490763)
536 | ,p_plugin_attribute_id=>wwv_flow_api.id(22970414855488118)
537 | ,p_display_sequence=>10
538 | ,p_display_value=>'Suppress Change Event'
539 | ,p_return_value=>'suppressChangeEvent'
540 | );
541 | wwv_flow_api.create_plugin_attr_value(
542 | p_id=>wwv_flow_api.id(22981477508505194)
543 | ,p_plugin_attribute_id=>wwv_flow_api.id(22970414855488118)
544 | ,p_display_sequence=>20
545 | ,p_display_value=>'Show Error as Alert'
546 | ,p_return_value=>'showErrorAsAlert'
547 | );
548 | end;
549 | /
550 | begin
551 | wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
552 | wwv_flow_api.g_varchar2_table(1) := '2866756E6374696F6E28297B0A202020202F2F616464696E6720746865207374796C652064796E616D6963616C6C7920746F2074686520686561640A202020202F2F746F6F206C6974746C6520666F7220697473206F776E2066696C650A202020207661';
553 | wwv_flow_api.g_varchar2_table(2) := '722074656D705374796C65203D20646F63756D656E742E637265617465456C656D656E7428277374796C6527293B0A2020202074656D705374796C652E747970653D22746578742F637373223B0A2020202074656D705374796C652E696E6E657248544D';
554 | wwv_flow_api.g_varchar2_table(3) := '4C203D20272E61752D657865637574652D637573746F6D5370696E6E6572436C6173737B27202B0A2020202027706F736974696F6E3A206162736F6C7574652021696D706F7274616E743B27202B0A20202020276C6566743A20302021696D706F727461';
555 | wwv_flow_api.g_varchar2_table(4) := '6E743B27202B0A202020202772696768743A20302021696D706F7274616E743B27202B0A20202020276D617267696E3A206175746F2021696D706F7274616E743B27202B0A2020202027746F703A20302021696D706F7274616E743B27202B0A20202020';
556 | wwv_flow_api.g_varchar2_table(5) := '27626F74746F6D3A20302021696D706F7274616E743B27202B0A20202020277A2D696E6465783A203435303B7D273B0A20202020646F63756D656E742E686561642E617070656E644368696C642874656D705374796C65293B0A7D2928293B0A0A766172';
557 | wwv_flow_api.g_varchar2_table(6) := '20617065787574696C73203D20746869732E617065787574696C73207C7C207B7D3B0A0A2866756E6374696F6E2864612C207365727665722C206974656D2C202429207B0A0A20202020617065787574696C732E73686F775370696E6E6572203D206675';
558 | wwv_flow_api.g_varchar2_table(7) := '6E6374696F6E20287053656C6563746F722C20704F7665726C617929207B0A20202020202020200A2020202020202020766172206C5370696E6E65722C0A2020202020202020202020206C57616974506F707570243B0A20202020202020200A20202020';
559 | wwv_flow_api.g_varchar2_table(8) := '20202020696628704F7665726C6179297B0A20202020202020202020202076617220626F64795374796C652020203D2027706F736974696F6E3A2066697865643B202020207A2D696E6465783A20313930303B207669736962696C6974793A2076697369';
560 | wwv_flow_api.g_varchar2_table(9) := '626C653B2077696474683A20313030253B206865696768743A20313030253B206261636B67726F756E643A2072676261283235352C203235352C203235352C20302E35293B273B0A202020202020202020202020766172206E6F726D616C5374796C6520';
561 | wwv_flow_api.g_varchar2_table(10) := '3D2027706F736974696F6E3A206162736F6C7574653B207A2D696E6465783A203434303B20207669736962696C6974793A2076697369626C653B2077696474683A20313030253B206865696768743A20313030253B206261636B67726F756E643A207267';
562 | wwv_flow_api.g_varchar2_table(11) := '6261283235352C203235352C203235352C20302E35293B273B0A0A2020202020202020202020206C57616974506F70757024203D20242820273C646976207374796C653D2227202B20287053656C6563746F72203D3D2027626F647927203F20626F6479';
563 | wwv_flow_api.g_varchar2_table(12) := '5374796C65203A206E6F726D616C5374796C6529202B2027223E3C2F6469763E2720292E70726570656E64546F282024287053656C6563746F722920293B0A20202020202020207D0A0A20202020202020206C5370696E6E6572203D20617065782E7574';
564 | wwv_flow_api.g_varchar2_table(13) := '696C2E73686F775370696E6E6572287053656C6563746F722C20287053656C6563746F72203D3D2027626F647927203F207B66697865643A20747275657D203A207B7370696E6E6572436C6173733A202761752D657865637574652D637573746F6D5370';
565 | wwv_flow_api.g_varchar2_table(14) := '696E6E6572436C617373277D29293B0A0A202020202020202072657475726E207B0A20202020202020202020202072656D6F76653A2066756E6374696F6E202829207B0A20202020202020202020202020202020696620286C57616974506F7075702420';
566 | wwv_flow_api.g_varchar2_table(15) := '213D3D20756E646566696E656429207B0A20202020202020202020202020202020202020206C57616974506F707570242E72656D6F766528293B0A202020202020202020202020202020207D0A2020202020202020202020202020202069662028206C53';
567 | wwv_flow_api.g_varchar2_table(16) := '70696E6E657220213D3D20756E646566696E65642029207B0A20202020202020202020202020202020202020206C5370696E6E65722E72656D6F766528293B0A202020202020202020202020202020207D0A2020202020202020202020207D0A20202020';
568 | wwv_flow_api.g_varchar2_table(17) := '202020207D3B0A202020207D3B0A0A202020202F2F6275696C64732061206E6573746564206F626A65637420696620697420646F65736E277420657869737420616E642061737369676E7320697420612076616C75650A20202020617065787574696C73';
569 | wwv_flow_api.g_varchar2_table(18) := '2E6372656174654E65737465644F626A656374416E6441737369676E203D2066756E6374696F6E286F626A2C206B6579506174682C2076616C756529207B0A20202020202020206B657950617468203D206B6579506174682E73706C697428272E27293B';
570 | wwv_flow_api.g_varchar2_table(19) := '0A20202020202020206C6173744B6579496E646578203D206B6579506174682E6C656E6774682D313B0A2020202020202020666F7220287661722069203D20303B2069203C206C6173744B6579496E6465783B202B2B206929207B0A2020202020202020';
571 | wwv_flow_api.g_varchar2_table(20) := '202020206B6579203D206B6579506174685B695D3B0A2020202020202020202020206966202821286B657920696E206F626A29297B0A202020202020202020202020202020206F626A5B6B65795D203D207B7D3B0A2020202020202020202020207D0A20';
572 | wwv_flow_api.g_varchar2_table(21) := '20202020202020202020206F626A203D206F626A5B6B65795D3B0A20202020202020207D0A20202020202020206F626A5B6B6579506174685B6C6173744B6579496E6465785D5D203D2076616C75653B0A202020207D3B0A202020200A20202020617065';
573 | wwv_flow_api.g_varchar2_table(22) := '787574696C732E65786563757465506C53716C436F6465203D2066756E6374696F6E28297B0A20202020202020200A2020202020202020617065782E646562756728274578656375746520504C2F53514C20436F646520272C2074686973293B0A0A2020';
574 | wwv_flow_api.g_varchar2_table(23) := '20202020202076617220616374696F6E20202020202020202020203D20746869732E616374696F6E2C0A202020202020202020202020726573756D6543616C6C6261636B2020203D20746869732E726573756D6543616C6C6261636B2C0A202020202020';
575 | wwv_flow_api.g_varchar2_table(24) := '202020202020706167654974656D7320202020202020203D204A534F4E2E706172736528616374696F6E2E6174747269627574653031292C0A2020202020202020202020206C6F6164657253657474696E67732020203D204A534F4E2E70617273652861';
576 | wwv_flow_api.g_varchar2_table(25) := '6374696F6E2E6174747269627574653032292C0A202020202020202020202020636C6F6253657474696E677320202020203D204A534F4E2E706172736528616374696F6E2E6174747269627574653033292C0A2020202020202020202020206F7074696F';
577 | wwv_flow_api.g_varchar2_table(26) := '6E73202020202020202020203D204A534F4E2E706172736528616374696F6E2E6174747269627574653035292C0A2020202020202020202020206572726F724D65737361676573202020203D204A534F4E2E706172736528616374696F6E2E6174747269';
578 | wwv_flow_api.g_varchar2_table(27) := '627574653036292C0A20202020202020202020202073796E63202020202020202020202020203D2028616374696F6E2E77616974466F72526573756C74202626206F7074696F6E732E73796E63293B0A0A202020202020202066756E6374696F6E205F68';
579 | wwv_flow_api.g_varchar2_table(28) := '616E646C65526573706F6E7365282070446174612029207B0A20202020202020202020202069662870446174612E737461747573203D3D20277375636365737327297B0A20202020202020202020202020202020766172206974656D436F756E742C2069';
580 | wwv_flow_api.g_varchar2_table(29) := '74656D41727261793B0A0A202020202020202020202020202020202F2F726567756C61722070616765206974656D730A202020202020202020202020202020206966282070446174612026262070446174612E6974656D732029207B0A20202020202020';
581 | wwv_flow_api.g_varchar2_table(30) := '202020202020202020202020206974656D436F756E74203D2070446174612E6974656D732E6C656E6774683B0A20202020202020202020202020202020202020206974656D4172726179203D2070446174612E6974656D733B0A20202020202020202020';
582 | wwv_flow_api.g_varchar2_table(31) := '20202020202020202020666F7228207661722069203D20303B2069203C206974656D436F756E743B20692B2B2029207B0A202020202020202020202020202020202020202020202020247328206974656D41727261795B695D2E69642C206974656D4172';
583 | wwv_flow_api.g_varchar2_table(32) := '7261795B695D2E76616C75652C206E756C6C2C206F7074696F6E732E73757070726573734368616E67654576656E74293B0A20202020202020202020202020202020202020207D0A202020202020202020202020202020207D0A0A202020202020202020';
584 | wwv_flow_api.g_varchar2_table(33) := '202020202020202F2F636C6F622070616765206974656D2F207661726961626C652F207661726961626C65206173206A736F6E0A20202020202020202020202020202020696628636C6F6253657474696E67732E72657475726E436C6F62297B0A202020';
585 | wwv_flow_api.g_varchar2_table(34) := '202020202020202020202020202020202073776974636828636C6F6253657474696E67732E72657475726E436C6F62496E746F297B0A202020202020202020202020202020202020202020202020636173652027706167656974656D273A0A2020202020';
586 | wwv_flow_api.g_varchar2_table(35) := '2020202020202020202020202020202020202020202020247328636C6F6253657474696E67732E72657475726E436C6F624974656D2C2070446174612E636C6F622C206E756C6C2C206F7074696F6E732E73757070726573734368616E67654576656E74';
587 | wwv_flow_api.g_varchar2_table(36) := '293B0A20202020202020202020202020202020202020202020202020202020627265616B3B0A2020202020202020202020202020202020202020202020206361736520276A6176617363726970747661726961626C65273A0A2020202020202020202020';
588 | wwv_flow_api.g_varchar2_table(37) := '2020202020202020202020202020202020617065787574696C732E6372656174654E65737465644F626A656374416E6441737369676E2877696E646F772C20636C6F6253657474696E67732E72657475726E436C6F625661726961626C652C2070446174';
589 | wwv_flow_api.g_varchar2_table(38) := '612E636C6F62293B0A20202020202020202020202020202020202020202020202020202020627265616B3B0A2020202020202020202020202020202020202020202020206361736520276A6176617363726970747661726961626C656A736F6E273A0A20';
590 | wwv_flow_api.g_varchar2_table(39) := '202020202020202020202020202020202020202020202020202020617065787574696C732E6372656174654E65737465644F626A656374416E6441737369676E2877696E646F772C20636C6F6253657474696E67732E72657475726E436C6F6256617269';
591 | wwv_flow_api.g_varchar2_table(40) := '61626C652C204A534F4E2E70617273652870446174612E636C6F6229293B0A20202020202020202020202020202020202020202020202020202020627265616B3B0A20202020202020202020202020202020202020202020202064656661756C743A0A20';
592 | wwv_flow_api.g_varchar2_table(41) := '202020202020202020202020202020202020202020202020202020627265616B3B0A20202020202020202020202020202020202020207D0A202020202020202020202020202020207D0A202020202020202020202020202020200A202020202020202020';
593 | wwv_flow_api.g_varchar2_table(42) := '2020202020202069662870446174612E6D657373616765297B0A2020202020202020202020202020202020202020617065782E6D6573736167652E73686F7750616765537563636573732870446174612E6D657373616765293B0A202020202020202020';
594 | wwv_flow_api.g_varchar2_table(43) := '202020202020207D0A0A202020202020202020202020202020202F2A20526573756D6520657865637574696F6E206F6620616374696F6E73206865726520616E6420706173732066616C736520746F207468652063616C6C6261636B2C20746F20696E64';
595 | wwv_flow_api.g_varchar2_table(44) := '6963617465206E6F0A202020202020202020202020202020206572726F7220686173206F6363757272656420776974682074686520416A61782063616C6C2E202A2F0A2020202020202020202020202020202064612E726573756D652820726573756D65';
596 | wwv_flow_api.g_varchar2_table(45) := '43616C6C6261636B2C2066616C736520293B0A2020202020202020202020207D20656C7365206966202870446174612E737461747573203D3D20276572726F7227297B0A2020202020202020202020202020202069662870446174612E6D657373616765';
597 | wwv_flow_api.g_varchar2_table(46) := '297B0A0A20202020202020202020202020202020202020206966286F7074696F6E732E73686F774572726F724173416C657274297B0A202020202020202020202020202020202020202020202020617065782E6D6573736167652E616C65727428704461';
598 | wwv_flow_api.g_varchar2_table(47) := '74612E6D657373616765293B0A20202020202020202020202020202020202020207D20656C7365207B0A2020202020202020202020202020202020202020202020202F2F20466972737420636C65617220746865206572726F72730A2020202020202020';
599 | wwv_flow_api.g_varchar2_table(48) := '20202020202020202020202020202020617065782E6D6573736167652E636C6561724572726F727328293B0A0A2020202020202020202020202020202020202020202020202F2F204E6F772073686F77206E6577206572726F72730A2020202020202020';
600 | wwv_flow_api.g_varchar2_table(49) := '20202020202020202020202020202020617065782E6D6573736167652E73686F774572726F7273285B0A202020202020202020202020202020202020202020202020202020207B0A20202020202020202020202020202020202020202020202020202020';
601 | wwv_flow_api.g_varchar2_table(50) := '20202020747970653A20202020202020226572726F72222C0A20202020202020202020202020202020202020202020202020202020202020206C6F636174696F6E3A2020205B2270616765225D2C0A202020202020202020202020202020202020202020';
602 | wwv_flow_api.g_varchar2_table(51) := '20202020202020202020206D6573736167653A2020202070446174612E6D6573736167652C0A2020202020202020202020202020202020202020202020202020202020202020756E736166653A202020202066616C73650A202020202020202020202020';
603 | wwv_flow_api.g_varchar2_table(52) := '202020202020202020202020202020207D0A2020202020202020202020202020202020202020202020205D293B0A20202020202020202020202020202020202020207D0A202020202020202020202020202020207D0A2020202020202020202020207D0A';
604 | wwv_flow_api.g_varchar2_table(53) := '20202020202020207D0A0A20202020202020202F2F204572726F722063616C6C6261636B2063616C6C6564207768656E2074686520416A61782063616C6C206661696C730A202020202020202066756E6374696F6E205F6572726F722820706A71584852';
605 | wwv_flow_api.g_varchar2_table(54) := '2C2070546578745374617475732C20704572726F725468726F776E2029207B202020200A20202020202020202020202064612E68616E646C65416A61784572726F72732820706A715848522C2070546578745374617475732C20704572726F725468726F';
606 | wwv_flow_api.g_varchar2_table(55) := '776E2C20726573756D6543616C6C6261636B20293B0A20202020202020207D0A20202020202020200A2020202020202020766172206C5370696E6E6572243B0A202020202020202076617220756E697175654964203D206E6577204461746528292E6765';
607 | wwv_flow_api.g_varchar2_table(56) := '7454696D6528293B0A20202020202020200A20202020202020206966286C6F6164657253657474696E67732E73686F774C6F6164657229207B0A202020202020202020202020737769746368286C6F6164657253657474696E67732E6C6F616465725479';
608 | wwv_flow_api.g_varchar2_table(57) := '7065297B0A202020202020202020202020202020206361736520277370696E6E6572273A0A2020202020202020202020202020202020202020617065782E7574696C2E64656C61794C696E6765722E737461727428756E6971756549642C2066756E6374';
609 | wwv_flow_api.g_varchar2_table(58) := '696F6E2829207B0A2020202020202020202020202020202020202020202020206C5370696E6E657224203D20617065787574696C732E73686F775370696E6E6572286C6F6164657253657474696E67732E6C6F61646572506F736974696F6E2C2066616C';
610 | wwv_flow_api.g_varchar2_table(59) := '7365293B0A20202020202020202020202020202020202020207D293B0A2020202020202020202020202020202020202020627265616B3B0A202020202020202020202020202020206361736520277370696E6E6572616E646F7665726C6179273A0A2020';
611 | wwv_flow_api.g_varchar2_table(60) := '202020202020202020202020202020202020617065782E7574696C2E64656C61794C696E6765722E737461727428756E6971756549642C2066756E6374696F6E2829207B0A2020202020202020202020202020202020202020202020206C5370696E6E65';
612 | wwv_flow_api.g_varchar2_table(61) := '7224203D20617065787574696C732E73686F775370696E6E6572286C6F6164657253657474696E67732E6C6F61646572506F736974696F6E2C2074727565293B0A20202020202020202020202020202020202020207D293B0A2020202020202020202020';
613 | wwv_flow_api.g_varchar2_table(62) := '202020202020202020627265616B3B0A2020202020202020202020202020202064656661756C743A0A2020202020202020202020202020202020202020627265616B3B0A2020202020202020202020207D0A20202020202020207D0A2020202020202020';
614 | wwv_flow_api.g_varchar2_table(63) := '0A20202020202020207661722068616E646C655F7370696E6E6572203D2066756E6374696F6E28297B0A2020202020202020202020206966286C6F6164657253657474696E67732E73686F774C6F61646572297B0A202020202020202020202020202020';
615 | wwv_flow_api.g_varchar2_table(64) := '20617065782E7574696C2E64656C61794C696E6765722E66696E69736828756E6971756549642C2066756E6374696F6E28297B0A20202020202020202020202020202020202020206966286C5370696E6E657224297B0A20202020202020202020202020';
616 | wwv_flow_api.g_varchar2_table(65) := '20202020202020202020206C5370696E6E6572242E72656D6F766528293B0A20202020202020202020202020202020202020207D0A202020202020202020202020202020207D293B20200A2020202020202020202020207D0A20202020202020207D3B0A';
617 | wwv_flow_api.g_varchar2_table(66) := '0A202020202020202076617220636C6F62546F5375626D69743B0A0A2020202020202020696628636C6F6253657474696E67732E7375626D6974436C6F62297B0A20202020202020202020202073776974636828636C6F6253657474696E67732E737562';
618 | wwv_flow_api.g_varchar2_table(67) := '6D6974436C6F6246726F6D297B0A20202020202020202020202020202020636173652027706167656974656D273A0A2020202020202020202020202020202020202020636C6F62546F5375626D6974203D206974656D28636C6F6253657474696E67732E';
619 | wwv_flow_api.g_varchar2_table(68) := '7375626D6974436C6F624974656D292E67657456616C756528293B0A2020202020202020202020202020202020202020627265616B3B0A202020202020202020202020202020206361736520276A6176617363726970747661726961626C65273A0A2020';
620 | wwv_flow_api.g_varchar2_table(69) := '20202020202020202020202020202020202076617220746F5375626D6974203D2077696E646F775B636C6F6253657474696E67732E7375626D6974436C6F625661726961626C655D3B0A0A2020202020202020202020202020202020202020696628746F';
621 | wwv_flow_api.g_varchar2_table(70) := '5375626D697420696E7374616E63656F66204F626A656374297B0A202020202020202020202020202020202020202020202020636C6F62546F5375626D6974203D204A534F4E2E737472696E6769667928746F5375626D6974293B0A2020202020202020';
622 | wwv_flow_api.g_varchar2_table(71) := '2020202020202020202020207D20656C7365207B0A202020202020202020202020202020202020202020202020636C6F62546F5375626D6974203D20746F5375626D69743B0A20202020202020202020202020202020202020207D0A2020202020202020';
623 | wwv_flow_api.g_varchar2_table(72) := '202020202020202020202020627265616B3B0A2020202020202020202020202020202064656661756C743A0A2020202020202020202020202020202020202020627265616B3B0A2020202020202020202020207D0A20202020202020207D0A0A20202020';
624 | wwv_flow_api.g_varchar2_table(73) := '202020207365727665722E706C7567696E28616374696F6E2E616A61784964656E7469666965722C0A2020202020202020202020207B0A20202020202020202020202020202020706167654974656D73202020202020203A20706167654974656D732E69';
625 | wwv_flow_api.g_varchar2_table(74) := '74656D73546F5375626D69742C2020202F2F20416C726561647920696E206A51756572792073656C6563746F722073796E7461780A20202020202020202020202020202020705F636C6F625F3031202020202020203A20636C6F62546F5375626D69740A';
626 | wwv_flow_api.g_varchar2_table(75) := '2020202020202020202020207D2C0A2020202020202020202020207B0A20202020202020202020202020202020646174615479706520202020202020203A20276A736F6E272C0A202020202020202020202020202020206C6F6164696E67496E64696361';
627 | wwv_flow_api.g_varchar2_table(76) := '746F723A20706167654974656D732E6974656D73546F52657475726E2C2020202F2F20446973706C6179656420666F7220616C6C202250616765204974656D7320746F2052657475726E220A202020202020202020202020202020207375636365737320';
628 | wwv_flow_api.g_varchar2_table(77) := '20202020202020203A2066756E6374696F6E287044617461297B0A202020202020202020202020202020202020202068616E646C655F7370696E6E657228293B0A20202020202020202020202020202020202020205F68616E646C65526573706F6E7365';
629 | wwv_flow_api.g_varchar2_table(78) := '287044617461293B0A202020202020202020202020202020207D2C0A202020202020202020202020202020206572726F7220202020202020202020203A2066756E6374696F6E28706A715848522C2070546578745374617475732C20704572726F725468';
630 | wwv_flow_api.g_varchar2_table(79) := '726F776E297B0A202020202020202020202020202020202020202068616E646C655F7370696E6E657228293B0A20202020202020202020202020202020202020205F6572726F722820706A715848522C2070546578745374617475732C20704572726F72';
631 | wwv_flow_api.g_varchar2_table(80) := '5468726F776E20293B0A202020202020202020202020202020207D2C0A202020202020202020202020202020206173796E6320202020202020202020203A202173796E632C0A202020202020202020202020202020207461726765742020202020202020';
632 | wwv_flow_api.g_varchar2_table(81) := '20203A20746869732E62726F777365724576656E742E7461726765740A2020202020202020202020207D0A2020202020202020293B0A202020207D3B0A7D2928617065782E64612C20617065782E7365727665722C20617065782E6974656D2C20617065';
633 | wwv_flow_api.g_varchar2_table(82) := '782E6A5175657279293B0A2F2F2320736F757263654D617070696E6755524C3D7363726970742E6A732E6D61700A';
634 | null;
635 | end;
636 | /
637 | begin
638 | wwv_flow_api.create_plugin_file(
639 | p_id=>wwv_flow_api.id(23283577776894160)
640 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
641 | ,p_file_name=>'js/script.js'
642 | ,p_mime_type=>'application/x-javascript'
643 | ,p_file_charset=>'utf-8'
644 | ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table)
645 | );
646 | end;
647 | /
648 | begin
649 | wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
650 | wwv_flow_api.g_varchar2_table(1) := '2166756E6374696F6E28297B76617220653D646F63756D656E742E637265617465456C656D656E7428227374796C6522293B652E747970653D22746578742F637373222C652E696E6E657248544D4C3D222E61752D657865637574652D637573746F6D53';
651 | wwv_flow_api.g_varchar2_table(2) := '70696E6E6572436C6173737B706F736974696F6E3A206162736F6C7574652021696D706F7274616E743B6C6566743A20302021696D706F7274616E743B72696768743A20302021696D706F7274616E743B6D617267696E3A206175746F2021696D706F72';
652 | wwv_flow_api.g_varchar2_table(3) := '74616E743B746F703A20302021696D706F7274616E743B626F74746F6D3A20302021696D706F7274616E743B7A2D696E6465783A203435303B7D222C646F63756D656E742E686561642E617070656E644368696C642865297D28293B7661722061706578';
653 | wwv_flow_api.g_varchar2_table(4) := '7574696C733D746869732E617065787574696C737C7C7B7D3B2166756E6374696F6E28652C742C612C73297B617065787574696C732E73686F775370696E6E65723D66756E6374696F6E28652C74297B76617220612C693B69662874297B693D7328273C';
654 | wwv_flow_api.g_varchar2_table(5) := '646976207374796C653D22272B2822626F6479223D3D653F22706F736974696F6E3A2066697865643B202020207A2D696E6465783A20313930303B207669736962696C6974793A2076697369626C653B2077696474683A20313030253B20686569676874';
655 | wwv_flow_api.g_varchar2_table(6) := '3A20313030253B206261636B67726F756E643A2072676261283235352C203235352C203235352C20302E35293B223A22706F736974696F6E3A206162736F6C7574653B207A2D696E6465783A203434303B20207669736962696C6974793A207669736962';
656 | wwv_flow_api.g_varchar2_table(7) := '6C653B2077696474683A20313030253B206865696768743A20313030253B206261636B67726F756E643A2072676261283235352C203235352C203235352C20302E35293B22292B27223E3C2F6469763E27292E70726570656E64546F2873286529297D72';
657 | wwv_flow_api.g_varchar2_table(8) := '657475726E20613D617065782E7574696C2E73686F775370696E6E657228652C22626F6479223D3D653F7B66697865643A21307D3A7B7370696E6E6572436C6173733A2261752D657865637574652D637573746F6D5370696E6E6572436C617373227D29';
658 | wwv_flow_api.g_varchar2_table(9) := '2C7B72656D6F76653A66756E6374696F6E28297B766F69642030213D3D692626692E72656D6F766528292C766F69642030213D3D612626612E72656D6F766528297D7D7D2C617065787574696C732E6372656174654E65737465644F626A656374416E64';
659 | wwv_flow_api.g_varchar2_table(10) := '41737369676E3D66756E6374696F6E28652C742C61297B743D742E73706C697428222E22292C6C6173744B6579496E6465783D742E6C656E6774682D313B666F722876617220733D303B733C6C6173744B6579496E6465783B2B2B73296B65793D745B73';
660 | wwv_flow_api.g_varchar2_table(11) := '5D2C6B657920696E20657C7C28655B6B65795D3D7B7D292C653D655B6B65795D3B655B745B6C6173744B6579496E6465785D5D3D617D2C617065787574696C732E65786563757465506C53716C436F64653D66756E6374696F6E28297B617065782E6465';
661 | wwv_flow_api.g_varchar2_table(12) := '62756728224578656375746520504C2F53514C20436F646520222C74686973293B76617220732C693D746869732E616374696F6E2C723D746869732E726573756D6543616C6C6261636B2C6E3D4A534F4E2E706172736528692E61747472696275746530';
662 | wwv_flow_api.g_varchar2_table(13) := '31292C6F3D4A534F4E2E706172736528692E6174747269627574653032292C6C3D4A534F4E2E706172736528692E6174747269627574653033292C753D4A534F4E2E706172736528692E6174747269627574653035292C703D284A534F4E2E7061727365';
663 | wwv_flow_api.g_varchar2_table(14) := '28692E6174747269627574653036292C692E77616974466F72526573756C742626752E73796E63293B76617220633D286E65772044617465292E67657454696D6528293B6966286F2E73686F774C6F6164657229737769746368286F2E6C6F6164657254';
664 | wwv_flow_api.g_varchar2_table(15) := '797065297B63617365227370696E6E6572223A617065782E7574696C2E64656C61794C696E6765722E737461727428632C66756E6374696F6E28297B733D617065787574696C732E73686F775370696E6E6572286F2E6C6F61646572506F736974696F6E';
665 | wwv_flow_api.g_varchar2_table(16) := '2C2131297D293B627265616B3B63617365227370696E6E6572616E646F7665726C6179223A617065782E7574696C2E64656C61794C696E6765722E737461727428632C66756E6374696F6E28297B733D617065787574696C732E73686F775370696E6E65';
666 | wwv_flow_api.g_varchar2_table(17) := '72286F2E6C6F61646572506F736974696F6E2C2130297D297D76617220622C643D66756E6374696F6E28297B6F2E73686F774C6F616465722626617065782E7574696C2E64656C61794C696E6765722E66696E69736828632C66756E6374696F6E28297B';
667 | wwv_flow_api.g_varchar2_table(18) := '732626732E72656D6F766528297D297D3B6966286C2E7375626D6974436C6F6229737769746368286C2E7375626D6974436C6F6246726F6D297B6361736522706167656974656D223A623D61286C2E7375626D6974436C6F624974656D292E6765745661';
668 | wwv_flow_api.g_varchar2_table(19) := '6C756528293B627265616B3B63617365226A6176617363726970747661726961626C65223A766172206D3D77696E646F775B6C2E7375626D6974436C6F625661726961626C655D3B623D6D20696E7374616E63656F66204F626A6563743F4A534F4E2E73';
669 | wwv_flow_api.g_varchar2_table(20) := '7472696E67696679286D293A6D7D742E706C7567696E28692E616A61784964656E7469666965722C7B706167654974656D733A6E2E6974656D73546F5375626D69742C705F636C6F625F30313A627D2C7B64617461547970653A226A736F6E222C6C6F61';
670 | wwv_flow_api.g_varchar2_table(21) := '64696E67496E64696361746F723A6E2E6974656D73546F52657475726E2C737563636573733A66756E6374696F6E2874297B6428292C66756E6374696F6E2874297B6966282273756363657373223D3D742E737461747573297B76617220612C733B6966';
671 | wwv_flow_api.g_varchar2_table(22) := '28742626742E6974656D73297B613D742E6974656D732E6C656E6774682C733D742E6974656D733B666F722876617220693D303B693C613B692B2B29247328735B695D2E69642C735B695D2E76616C75652C6E756C6C2C752E7375707072657373436861';
672 | wwv_flow_api.g_varchar2_table(23) := '6E67654576656E74297D6966286C2E72657475726E436C6F6229737769746368286C2E72657475726E436C6F62496E746F297B6361736522706167656974656D223A2473286C2E72657475726E436C6F624974656D2C742E636C6F622C6E756C6C2C752E';
673 | wwv_flow_api.g_varchar2_table(24) := '73757070726573734368616E67654576656E74293B627265616B3B63617365226A6176617363726970747661726961626C65223A617065787574696C732E6372656174654E65737465644F626A656374416E6441737369676E2877696E646F772C6C2E72';
674 | wwv_flow_api.g_varchar2_table(25) := '657475726E436C6F625661726961626C652C742E636C6F62293B627265616B3B63617365226A6176617363726970747661726961626C656A736F6E223A617065787574696C732E6372656174654E65737465644F626A656374416E6441737369676E2877';
675 | wwv_flow_api.g_varchar2_table(26) := '696E646F772C6C2E72657475726E436C6F625661726961626C652C4A534F4E2E706172736528742E636C6F6229297D742E6D6573736167652626617065782E6D6573736167652E73686F77506167655375636365737328742E6D657373616765292C652E';
676 | wwv_flow_api.g_varchar2_table(27) := '726573756D6528722C2131297D656C7365226572726F72223D3D742E7374617475732626742E6D657373616765262628752E73686F774572726F724173416C6572743F617065782E6D6573736167652E616C65727428742E6D657373616765293A286170';
677 | wwv_flow_api.g_varchar2_table(28) := '65782E6D6573736167652E636C6561724572726F727328292C617065782E6D6573736167652E73686F774572726F7273285B7B747970653A226572726F72222C6C6F636174696F6E3A5B2270616765225D2C6D6573736167653A742E6D6573736167652C';
678 | wwv_flow_api.g_varchar2_table(29) := '756E736166653A21317D5D2929297D2874297D2C6572726F723A66756E6374696F6E28742C612C73297B6428292C66756E6374696F6E28742C612C73297B652E68616E646C65416A61784572726F727328742C612C732C72297D28742C612C73297D2C61';
679 | wwv_flow_api.g_varchar2_table(30) := '73796E633A21702C7461726765743A746869732E62726F777365724576656E742E7461726765747D297D7D28617065782E64612C617065782E7365727665722C617065782E6974656D2C617065782E6A5175657279293B';
680 | null;
681 | end;
682 | /
683 | begin
684 | wwv_flow_api.create_plugin_file(
685 | p_id=>wwv_flow_api.id(28716375280209793)
686 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
687 | ,p_file_name=>'js/script.min.js'
688 | ,p_mime_type=>'application/x-javascript'
689 | ,p_file_charset=>'utf-8'
690 | ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table)
691 | );
692 | end;
693 | /
694 | begin
695 | wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;
696 | wwv_flow_api.g_varchar2_table(1) := '7B2276657273696F6E223A332C226E616D6573223A5B5D2C226D617070696E6773223A22222C22736F7572636573223A5B227363726970742E6A73225D2C22736F7572636573436F6E74656E74223A5B222866756E6374696F6E28297B5C6E202020202F';
697 | wwv_flow_api.g_varchar2_table(2) := '2F616464696E6720746865207374796C652064796E616D6963616C6C7920746F2074686520686561645C6E202020202F2F746F6F206C6974746C6520666F7220697473206F776E2066696C655C6E202020207661722074656D705374796C65203D20646F';
698 | wwv_flow_api.g_varchar2_table(3) := '63756D656E742E637265617465456C656D656E7428277374796C6527293B5C6E2020202074656D705374796C652E747970653D5C22746578742F6373735C223B5C6E2020202074656D705374796C652E696E6E657248544D4C203D20272E61752D657865';
699 | wwv_flow_api.g_varchar2_table(4) := '637574652D637573746F6D5370696E6E6572436C6173737B27202B5C6E2020202027706F736974696F6E3A206162736F6C7574652021696D706F7274616E743B27202B5C6E20202020276C6566743A20302021696D706F7274616E743B27202B5C6E2020';
700 | wwv_flow_api.g_varchar2_table(5) := '20202772696768743A20302021696D706F7274616E743B27202B5C6E20202020276D617267696E3A206175746F2021696D706F7274616E743B27202B5C6E2020202027746F703A20302021696D706F7274616E743B27202B5C6E2020202027626F74746F';
701 | wwv_flow_api.g_varchar2_table(6) := '6D3A20302021696D706F7274616E743B27202B5C6E20202020277A2D696E6465783A203435303B7D273B5C6E20202020646F63756D656E742E686561642E617070656E644368696C642874656D705374796C65293B5C6E7D2928293B5C6E5C6E76617220';
702 | wwv_flow_api.g_varchar2_table(7) := '617065787574696C73203D20746869732E617065787574696C73207C7C207B7D3B5C6E5C6E2866756E6374696F6E2864612C207365727665722C206974656D2C202429207B5C6E5C6E20202020617065787574696C732E73686F775370696E6E6572203D';
703 | wwv_flow_api.g_varchar2_table(8) := '2066756E6374696F6E20287053656C6563746F722C20704F7665726C617929207B5C6E20202020202020205C6E2020202020202020766172206C5370696E6E65722C5C6E2020202020202020202020206C57616974506F707570243B5C6E202020202020';
704 | wwv_flow_api.g_varchar2_table(9) := '20205C6E2020202020202020696628704F7665726C6179297B5C6E20202020202020202020202076617220626F64795374796C652020203D2027706F736974696F6E3A2066697865643B202020207A2D696E6465783A20313930303B207669736962696C';
705 | wwv_flow_api.g_varchar2_table(10) := '6974793A2076697369626C653B2077696474683A20313030253B206865696768743A20313030253B206261636B67726F756E643A2072676261283235352C203235352C203235352C20302E35293B273B5C6E202020202020202020202020766172206E6F';
706 | wwv_flow_api.g_varchar2_table(11) := '726D616C5374796C65203D2027706F736974696F6E3A206162736F6C7574653B207A2D696E6465783A203434303B20207669736962696C6974793A2076697369626C653B2077696474683A20313030253B206865696768743A20313030253B206261636B';
707 | wwv_flow_api.g_varchar2_table(12) := '67726F756E643A2072676261283235352C203235352C203235352C20302E35293B273B5C6E5C6E2020202020202020202020206C57616974506F70757024203D20242820273C646976207374796C653D5C2227202B20287053656C6563746F72203D3D20';
708 | wwv_flow_api.g_varchar2_table(13) := '27626F647927203F20626F64795374796C65203A206E6F726D616C5374796C6529202B20275C223E3C2F6469763E2720292E70726570656E64546F282024287053656C6563746F722920293B5C6E20202020202020207D5C6E5C6E20202020202020206C';
709 | wwv_flow_api.g_varchar2_table(14) := '5370696E6E6572203D20617065782E7574696C2E73686F775370696E6E6572287053656C6563746F722C20287053656C6563746F72203D3D2027626F647927203F207B66697865643A20747275657D203A207B7370696E6E6572436C6173733A20276175';
710 | wwv_flow_api.g_varchar2_table(15) := '2D657865637574652D637573746F6D5370696E6E6572436C617373277D29293B5C6E5C6E202020202020202072657475726E207B5C6E20202020202020202020202072656D6F76653A2066756E6374696F6E202829207B5C6E2020202020202020202020';
711 | wwv_flow_api.g_varchar2_table(16) := '2020202020696620286C57616974506F7075702420213D3D20756E646566696E656429207B5C6E20202020202020202020202020202020202020206C57616974506F707570242E72656D6F766528293B5C6E202020202020202020202020202020207D5C';
712 | wwv_flow_api.g_varchar2_table(17) := '6E2020202020202020202020202020202069662028206C5370696E6E657220213D3D20756E646566696E65642029207B5C6E20202020202020202020202020202020202020206C5370696E6E65722E72656D6F766528293B5C6E20202020202020202020';
713 | wwv_flow_api.g_varchar2_table(18) := '2020202020207D5C6E2020202020202020202020207D5C6E20202020202020207D3B5C6E202020207D3B5C6E5C6E202020202F2F6275696C64732061206E6573746564206F626A65637420696620697420646F65736E277420657869737420616E642061';
714 | wwv_flow_api.g_varchar2_table(19) := '737369676E7320697420612076616C75655C6E20202020617065787574696C732E6372656174654E65737465644F626A656374416E6441737369676E203D2066756E6374696F6E286F626A2C206B6579506174682C2076616C756529207B5C6E20202020';
715 | wwv_flow_api.g_varchar2_table(20) := '202020206B657950617468203D206B6579506174682E73706C697428272E27293B5C6E20202020202020206C6173744B6579496E646578203D206B6579506174682E6C656E6774682D313B5C6E2020202020202020666F7220287661722069203D20303B';
716 | wwv_flow_api.g_varchar2_table(21) := '2069203C206C6173744B6579496E6465783B202B2B206929207B5C6E2020202020202020202020206B6579203D206B6579506174685B695D3B5C6E2020202020202020202020206966202821286B657920696E206F626A29297B5C6E2020202020202020';
717 | wwv_flow_api.g_varchar2_table(22) := '20202020202020206F626A5B6B65795D203D207B7D3B5C6E2020202020202020202020207D5C6E2020202020202020202020206F626A203D206F626A5B6B65795D3B5C6E20202020202020207D5C6E20202020202020206F626A5B6B6579506174685B6C';
718 | wwv_flow_api.g_varchar2_table(23) := '6173744B6579496E6465785D5D203D2076616C75653B5C6E202020207D3B5C6E202020205C6E20202020617065787574696C732E65786563757465506C53716C436F6465203D2066756E6374696F6E28297B5C6E20202020202020205C6E202020202020';
719 | wwv_flow_api.g_varchar2_table(24) := '2020617065782E646562756728274578656375746520504C2F53514C20436F646520272C2074686973293B5C6E5C6E202020202020202076617220616374696F6E20202020202020202020203D20746869732E616374696F6E2C5C6E2020202020202020';
720 | wwv_flow_api.g_varchar2_table(25) := '20202020726573756D6543616C6C6261636B2020203D20746869732E726573756D6543616C6C6261636B2C5C6E202020202020202020202020706167654974656D7320202020202020203D204A534F4E2E706172736528616374696F6E2E617474726962';
721 | wwv_flow_api.g_varchar2_table(26) := '7574653031292C5C6E2020202020202020202020206C6F6164657253657474696E67732020203D204A534F4E2E706172736528616374696F6E2E6174747269627574653032292C5C6E202020202020202020202020636C6F6253657474696E6773202020';
722 | wwv_flow_api.g_varchar2_table(27) := '20203D204A534F4E2E706172736528616374696F6E2E6174747269627574653033292C5C6E2020202020202020202020206F7074696F6E73202020202020202020203D204A534F4E2E706172736528616374696F6E2E6174747269627574653035292C5C';
723 | wwv_flow_api.g_varchar2_table(28) := '6E2020202020202020202020206572726F724D65737361676573202020203D204A534F4E2E706172736528616374696F6E2E6174747269627574653036292C5C6E20202020202020202020202073796E63202020202020202020202020203D2028616374';
724 | wwv_flow_api.g_varchar2_table(29) := '696F6E2E77616974466F72526573756C74202626206F7074696F6E732E73796E63293B5C6E5C6E202020202020202066756E6374696F6E205F68616E646C65526573706F6E7365282070446174612029207B5C6E20202020202020202020202069662870';
725 | wwv_flow_api.g_varchar2_table(30) := '446174612E737461747573203D3D20277375636365737327297B5C6E20202020202020202020202020202020766172206974656D436F756E742C206974656D41727261793B5C6E5C6E202020202020202020202020202020202F2F726567756C61722070';
726 | wwv_flow_api.g_varchar2_table(31) := '616765206974656D735C6E202020202020202020202020202020206966282070446174612026262070446174612E6974656D732029207B5C6E20202020202020202020202020202020202020206974656D436F756E74203D2070446174612E6974656D73';
727 | wwv_flow_api.g_varchar2_table(32) := '2E6C656E6774683B5C6E20202020202020202020202020202020202020206974656D4172726179203D2070446174612E6974656D733B5C6E2020202020202020202020202020202020202020666F7228207661722069203D20303B2069203C206974656D';
728 | wwv_flow_api.g_varchar2_table(33) := '436F756E743B20692B2B2029207B5C6E202020202020202020202020202020202020202020202020247328206974656D41727261795B695D2E69642C206974656D41727261795B695D2E76616C75652C206E756C6C2C206F7074696F6E732E7375707072';
729 | wwv_flow_api.g_varchar2_table(34) := '6573734368616E67654576656E74293B5C6E20202020202020202020202020202020202020207D5C6E202020202020202020202020202020207D5C6E5C6E202020202020202020202020202020202F2F636C6F622070616765206974656D2F2076617269';
730 | wwv_flow_api.g_varchar2_table(35) := '61626C652F207661726961626C65206173206A736F6E5C6E20202020202020202020202020202020696628636C6F6253657474696E67732E72657475726E436C6F62297B5C6E202020202020202020202020202020202020202073776974636828636C6F';
731 | wwv_flow_api.g_varchar2_table(36) := '6253657474696E67732E72657475726E436C6F62496E746F297B5C6E202020202020202020202020202020202020202020202020636173652027706167656974656D273A5C6E202020202020202020202020202020202020202020202020202020202473';
732 | wwv_flow_api.g_varchar2_table(37) := '28636C6F6253657474696E67732E72657475726E436C6F624974656D2C2070446174612E636C6F622C206E756C6C2C206F7074696F6E732E73757070726573734368616E67654576656E74293B5C6E202020202020202020202020202020202020202020';
733 | wwv_flow_api.g_varchar2_table(38) := '20202020202020627265616B3B5C6E2020202020202020202020202020202020202020202020206361736520276A6176617363726970747661726961626C65273A5C6E202020202020202020202020202020202020202020202020202020206170657875';
734 | wwv_flow_api.g_varchar2_table(39) := '74696C732E6372656174654E65737465644F626A656374416E6441737369676E2877696E646F772C20636C6F6253657474696E67732E72657475726E436C6F625661726961626C652C2070446174612E636C6F62293B5C6E202020202020202020202020';
735 | wwv_flow_api.g_varchar2_table(40) := '20202020202020202020202020202020627265616B3B5C6E2020202020202020202020202020202020202020202020206361736520276A6176617363726970747661726961626C656A736F6E273A5C6E2020202020202020202020202020202020202020';
736 | wwv_flow_api.g_varchar2_table(41) := '2020202020202020617065787574696C732E6372656174654E65737465644F626A656374416E6441737369676E2877696E646F772C20636C6F6253657474696E67732E72657475726E436C6F625661726961626C652C204A534F4E2E7061727365287044';
737 | wwv_flow_api.g_varchar2_table(42) := '6174612E636C6F6229293B5C6E20202020202020202020202020202020202020202020202020202020627265616B3B5C6E20202020202020202020202020202020202020202020202064656661756C743A5C6E2020202020202020202020202020202020';
738 | wwv_flow_api.g_varchar2_table(43) := '2020202020202020202020627265616B3B5C6E20202020202020202020202020202020202020207D5C6E202020202020202020202020202020207D5C6E202020202020202020202020202020205C6E202020202020202020202020202020206966287044';
739 | wwv_flow_api.g_varchar2_table(44) := '6174612E6D657373616765297B5C6E2020202020202020202020202020202020202020617065782E6D6573736167652E73686F7750616765537563636573732870446174612E6D657373616765293B5C6E202020202020202020202020202020207D5C6E';
740 | wwv_flow_api.g_varchar2_table(45) := '5C6E202020202020202020202020202020202F2A20526573756D6520657865637574696F6E206F6620616374696F6E73206865726520616E6420706173732066616C736520746F207468652063616C6C6261636B2C20746F20696E646963617465206E6F';
741 | wwv_flow_api.g_varchar2_table(46) := '5C6E202020202020202020202020202020206572726F7220686173206F6363757272656420776974682074686520416A61782063616C6C2E202A2F5C6E2020202020202020202020202020202064612E726573756D652820726573756D6543616C6C6261';
742 | wwv_flow_api.g_varchar2_table(47) := '636B2C2066616C736520293B5C6E2020202020202020202020207D20656C7365206966202870446174612E737461747573203D3D20276572726F7227297B5C6E2020202020202020202020202020202069662870446174612E6D657373616765297B5C6E';
743 | wwv_flow_api.g_varchar2_table(48) := '5C6E20202020202020202020202020202020202020206966286F7074696F6E732E73686F774572726F724173416C657274297B5C6E202020202020202020202020202020202020202020202020617065782E6D6573736167652E616C6572742870446174';
744 | wwv_flow_api.g_varchar2_table(49) := '612E6D657373616765293B5C6E20202020202020202020202020202020202020207D20656C7365207B5C6E2020202020202020202020202020202020202020202020202F2F20466972737420636C65617220746865206572726F72735C6E202020202020';
745 | wwv_flow_api.g_varchar2_table(50) := '202020202020202020202020202020202020617065782E6D6573736167652E636C6561724572726F727328293B5C6E5C6E2020202020202020202020202020202020202020202020202F2F204E6F772073686F77206E6577206572726F72735C6E202020';
746 | wwv_flow_api.g_varchar2_table(51) := '202020202020202020202020202020202020202020617065782E6D6573736167652E73686F774572726F7273285B5C6E202020202020202020202020202020202020202020202020202020207B5C6E202020202020202020202020202020202020202020';
747 | wwv_flow_api.g_varchar2_table(52) := '2020202020202020202020747970653A202020202020205C226572726F725C222C5C6E20202020202020202020202020202020202020202020202020202020202020206C6F636174696F6E3A2020205B5C22706167655C225D2C5C6E2020202020202020';
748 | wwv_flow_api.g_varchar2_table(53) := '2020202020202020202020202020202020202020202020206D6573736167653A2020202070446174612E6D6573736167652C5C6E2020202020202020202020202020202020202020202020202020202020202020756E736166653A202020202066616C73';
749 | wwv_flow_api.g_varchar2_table(54) := '655C6E202020202020202020202020202020202020202020202020202020207D5C6E2020202020202020202020202020202020202020202020205D293B5C6E20202020202020202020202020202020202020207D5C6E2020202020202020202020202020';
750 | wwv_flow_api.g_varchar2_table(55) := '20207D5C6E2020202020202020202020207D5C6E20202020202020207D5C6E5C6E20202020202020202F2F204572726F722063616C6C6261636B2063616C6C6564207768656E2074686520416A61782063616C6C206661696C735C6E2020202020202020';
751 | wwv_flow_api.g_varchar2_table(56) := '66756E6374696F6E205F6572726F722820706A715848522C2070546578745374617475732C20704572726F725468726F776E2029207B202020205C6E20202020202020202020202064612E68616E646C65416A61784572726F72732820706A715848522C';
752 | wwv_flow_api.g_varchar2_table(57) := '2070546578745374617475732C20704572726F725468726F776E2C20726573756D6543616C6C6261636B20293B5C6E20202020202020207D5C6E20202020202020205C6E2020202020202020766172206C5370696E6E6572243B5C6E2020202020202020';
753 | wwv_flow_api.g_varchar2_table(58) := '76617220756E697175654964203D206E6577204461746528292E67657454696D6528293B5C6E20202020202020205C6E20202020202020206966286C6F6164657253657474696E67732E73686F774C6F6164657229207B5C6E2020202020202020202020';
754 | wwv_flow_api.g_varchar2_table(59) := '20737769746368286C6F6164657253657474696E67732E6C6F6164657254797065297B5C6E202020202020202020202020202020206361736520277370696E6E6572273A5C6E2020202020202020202020202020202020202020617065782E7574696C2E';
755 | wwv_flow_api.g_varchar2_table(60) := '64656C61794C696E6765722E737461727428756E6971756549642C2066756E6374696F6E2829207B5C6E2020202020202020202020202020202020202020202020206C5370696E6E657224203D20617065787574696C732E73686F775370696E6E657228';
756 | wwv_flow_api.g_varchar2_table(61) := '6C6F6164657253657474696E67732E6C6F61646572506F736974696F6E2C2066616C7365293B5C6E20202020202020202020202020202020202020207D293B5C6E2020202020202020202020202020202020202020627265616B3B5C6E20202020202020';
757 | wwv_flow_api.g_varchar2_table(62) := '2020202020202020206361736520277370696E6E6572616E646F7665726C6179273A5C6E2020202020202020202020202020202020202020617065782E7574696C2E64656C61794C696E6765722E737461727428756E6971756549642C2066756E637469';
758 | wwv_flow_api.g_varchar2_table(63) := '6F6E2829207B5C6E2020202020202020202020202020202020202020202020206C5370696E6E657224203D20617065787574696C732E73686F775370696E6E6572286C6F6164657253657474696E67732E6C6F61646572506F736974696F6E2C20747275';
759 | wwv_flow_api.g_varchar2_table(64) := '65293B5C6E20202020202020202020202020202020202020207D293B5C6E2020202020202020202020202020202020202020627265616B3B5C6E2020202020202020202020202020202064656661756C743A5C6E20202020202020202020202020202020';
760 | wwv_flow_api.g_varchar2_table(65) := '20202020627265616B3B5C6E2020202020202020202020207D5C6E20202020202020207D5C6E20202020202020205C6E20202020202020207661722068616E646C655F7370696E6E6572203D2066756E6374696F6E28297B5C6E20202020202020202020';
761 | wwv_flow_api.g_varchar2_table(66) := '20206966286C6F6164657253657474696E67732E73686F774C6F61646572297B5C6E20202020202020202020202020202020617065782E7574696C2E64656C61794C696E6765722E66696E69736828756E6971756549642C2066756E6374696F6E28297B';
762 | wwv_flow_api.g_varchar2_table(67) := '5C6E20202020202020202020202020202020202020206966286C5370696E6E657224297B5C6E2020202020202020202020202020202020202020202020206C5370696E6E6572242E72656D6F766528293B5C6E2020202020202020202020202020202020';
763 | wwv_flow_api.g_varchar2_table(68) := '2020207D5C6E202020202020202020202020202020207D293B20205C6E2020202020202020202020207D5C6E20202020202020207D3B5C6E5C6E202020202020202076617220636C6F62546F5375626D69743B5C6E5C6E2020202020202020696628636C';
764 | wwv_flow_api.g_varchar2_table(69) := '6F6253657474696E67732E7375626D6974436C6F62297B5C6E20202020202020202020202073776974636828636C6F6253657474696E67732E7375626D6974436C6F6246726F6D297B5C6E20202020202020202020202020202020636173652027706167';
765 | wwv_flow_api.g_varchar2_table(70) := '656974656D273A5C6E2020202020202020202020202020202020202020636C6F62546F5375626D6974203D206974656D28636C6F6253657474696E67732E7375626D6974436C6F624974656D292E67657456616C756528293B5C6E202020202020202020';
766 | wwv_flow_api.g_varchar2_table(71) := '2020202020202020202020627265616B3B5C6E202020202020202020202020202020206361736520276A6176617363726970747661726961626C65273A5C6E202020202020202020202020202020202020202076617220746F5375626D6974203D207769';
767 | wwv_flow_api.g_varchar2_table(72) := '6E646F775B636C6F6253657474696E67732E7375626D6974436C6F625661726961626C655D3B5C6E5C6E2020202020202020202020202020202020202020696628746F5375626D697420696E7374616E63656F66204F626A656374297B5C6E2020202020';
768 | wwv_flow_api.g_varchar2_table(73) := '20202020202020202020202020202020202020636C6F62546F5375626D6974203D204A534F4E2E737472696E6769667928746F5375626D6974293B5C6E20202020202020202020202020202020202020207D20656C7365207B5C6E202020202020202020';
769 | wwv_flow_api.g_varchar2_table(74) := '202020202020202020202020202020636C6F62546F5375626D6974203D20746F5375626D69743B5C6E20202020202020202020202020202020202020207D5C6E2020202020202020202020202020202020202020627265616B3B5C6E2020202020202020';
770 | wwv_flow_api.g_varchar2_table(75) := '202020202020202064656661756C743A5C6E2020202020202020202020202020202020202020627265616B3B5C6E2020202020202020202020207D5C6E20202020202020207D5C6E5C6E20202020202020207365727665722E706C7567696E2861637469';
771 | wwv_flow_api.g_varchar2_table(76) := '6F6E2E616A61784964656E7469666965722C5C6E2020202020202020202020207B5C6E20202020202020202020202020202020706167654974656D73202020202020203A20706167654974656D732E6974656D73546F5375626D69742C2020202F2F2041';
772 | wwv_flow_api.g_varchar2_table(77) := '6C726561647920696E206A51756572792073656C6563746F722073796E7461785C6E20202020202020202020202020202020705F636C6F625F3031202020202020203A20636C6F62546F5375626D69745C6E2020202020202020202020207D2C5C6E2020';
773 | wwv_flow_api.g_varchar2_table(78) := '202020202020202020207B5C6E20202020202020202020202020202020646174615479706520202020202020203A20276A736F6E272C5C6E202020202020202020202020202020206C6F6164696E67496E64696361746F723A20706167654974656D732E';
774 | wwv_flow_api.g_varchar2_table(79) := '6974656D73546F52657475726E2C2020202F2F20446973706C6179656420666F7220616C6C205C2250616765204974656D7320746F2052657475726E5C225C6E20202020202020202020202020202020737563636573732020202020202020203A206675';
775 | wwv_flow_api.g_varchar2_table(80) := '6E6374696F6E287044617461297B5C6E202020202020202020202020202020202020202068616E646C655F7370696E6E657228293B5C6E20202020202020202020202020202020202020205F68616E646C65526573706F6E7365287044617461293B5C6E';
776 | wwv_flow_api.g_varchar2_table(81) := '202020202020202020202020202020207D2C5C6E202020202020202020202020202020206572726F7220202020202020202020203A2066756E6374696F6E28706A715848522C2070546578745374617475732C20704572726F725468726F776E297B5C6E';
777 | wwv_flow_api.g_varchar2_table(82) := '202020202020202020202020202020202020202068616E646C655F7370696E6E657228293B5C6E20202020202020202020202020202020202020205F6572726F722820706A715848522C2070546578745374617475732C20704572726F725468726F776E';
778 | wwv_flow_api.g_varchar2_table(83) := '20293B5C6E202020202020202020202020202020207D2C5C6E202020202020202020202020202020206173796E6320202020202020202020203A202173796E632C5C6E20202020202020202020202020202020746172676574202020202020202020203A';
779 | wwv_flow_api.g_varchar2_table(84) := '20746869732E62726F777365724576656E742E7461726765745C6E2020202020202020202020207D5C6E2020202020202020293B5C6E202020207D3B5C6E7D2928617065782E64612C20617065782E7365727665722C20617065782E6974656D2C206170';
780 | wwv_flow_api.g_varchar2_table(85) := '65782E6A5175657279293B225D2C2266696C65223A227363726970742E6A73227D';
781 | null;
782 | end;
783 | /
784 | begin
785 | wwv_flow_api.create_plugin_file(
786 | p_id=>wwv_flow_api.id(28716774266209775)
787 | ,p_plugin_id=>wwv_flow_api.id(1843861354211161477)
788 | ,p_file_name=>'js/script.js.map'
789 | ,p_mime_type=>'application/octet-stream'
790 | ,p_file_charset=>'utf-8'
791 | ,p_file_content=>wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table)
792 | );
793 | end;
794 | /
795 | begin
796 | wwv_flow_api.import_end(p_auto_install_sup_obj => nvl(wwv_flow_application_install.get_auto_install_sup_obj, false), p_is_component_import => true);
797 | commit;
798 | end;
799 | /
800 | set verify on feedback on define on
801 | prompt ...done
802 |
--------------------------------------------------------------------------------
/src/js/script.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | //adding the style dynamically to the head
3 | //too little for its own file
4 | var tempStyle = document.createElement('style');
5 | tempStyle.type="text/css";
6 | tempStyle.innerHTML = '.au-execute-customSpinnerClass{' +
7 | 'position: absolute !important;' +
8 | 'left: 0 !important;' +
9 | 'right: 0 !important;' +
10 | 'margin: auto !important;' +
11 | 'top: 0 !important;' +
12 | 'bottom: 0 !important;' +
13 | 'z-index: 450;}';
14 | document.head.appendChild(tempStyle);
15 | })();
16 |
17 | var apexutils = this.apexutils || {};
18 |
19 | (function(da, server, item, $) {
20 |
21 | apexutils.showSpinner = function (pSelector, pOverlay) {
22 |
23 | var lSpinner,
24 | lWaitPopup$;
25 |
26 | if(pOverlay){
27 | var bodyStyle = 'position: fixed; z-index: 1900; visibility: visible; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.5);';
28 | var normalStyle = 'position: absolute; z-index: 440; visibility: visible; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.5);';
29 |
30 | lWaitPopup$ = $( '' ).prependTo( $(pSelector) );
31 | }
32 |
33 | lSpinner = apex.util.showSpinner(pSelector, (pSelector == 'body' ? {fixed: true} : {spinnerClass: 'au-execute-customSpinnerClass'}));
34 |
35 | return {
36 | remove: function () {
37 | if (lWaitPopup$ !== undefined) {
38 | lWaitPopup$.remove();
39 | }
40 | if ( lSpinner !== undefined ) {
41 | lSpinner.remove();
42 | }
43 | }
44 | };
45 | };
46 |
47 | //builds a nested object if it doesn't exist and assigns it a value
48 | apexutils.createNestedObjectAndAssign = function(obj, keyPath, value) {
49 | keyPath = keyPath.split('.');
50 | lastKeyIndex = keyPath.length-1;
51 | for (var i = 0; i < lastKeyIndex; ++ i) {
52 | key = keyPath[i];
53 | if (!(key in obj)){
54 | obj[key] = {};
55 | }
56 | obj = obj[key];
57 | }
58 | obj[keyPath[lastKeyIndex]] = value;
59 | };
60 |
61 | apexutils.executePlSqlCode = function(){
62 |
63 | apex.debug('Execute PL/SQL Code ', this);
64 |
65 | var action = this.action,
66 | resumeCallback = this.resumeCallback,
67 | pageItems = JSON.parse(action.attribute01),
68 | loaderSettings = JSON.parse(action.attribute02),
69 | clobSettings = JSON.parse(action.attribute03),
70 | options = JSON.parse(action.attribute05),
71 | errorMessages = JSON.parse(action.attribute06),
72 | sync = (action.waitForResult && options.sync);
73 |
74 | function _handleResponse( pData ) {
75 | if(pData.status == 'success'){
76 | var itemCount, itemArray;
77 |
78 | //regular page items
79 | if( pData && pData.items ) {
80 | itemCount = pData.items.length;
81 | itemArray = pData.items;
82 | for( var i = 0; i < itemCount; i++ ) {
83 | $s( itemArray[i].id, itemArray[i].value, null, options.suppressChangeEvent);
84 | }
85 | }
86 |
87 | //clob page item/ variable/ variable as json
88 | if(clobSettings.returnClob){
89 | switch(clobSettings.returnClobInto){
90 | case 'pageitem':
91 | $s(clobSettings.returnClobItem, pData.clob, null, options.suppressChangeEvent);
92 | break;
93 | case 'javascriptvariable':
94 | apexutils.createNestedObjectAndAssign(window, clobSettings.returnClobVariable, pData.clob);
95 | break;
96 | case 'javascriptvariablejson':
97 | apexutils.createNestedObjectAndAssign(window, clobSettings.returnClobVariable, JSON.parse(pData.clob));
98 | break;
99 | default:
100 | break;
101 | }
102 | }
103 |
104 | if(pData.message){
105 | apex.message.showPageSuccess(pData.message);
106 | }
107 |
108 | /* Resume execution of actions here and pass false to the callback, to indicate no
109 | error has occurred with the Ajax call. */
110 | da.resume( resumeCallback, false );
111 | } else if (pData.status == 'error'){
112 | if(pData.message){
113 |
114 | if(options.showErrorAsAlert){
115 | apex.message.alert(pData.message);
116 | } else {
117 | // First clear the errors
118 | apex.message.clearErrors();
119 |
120 | // Now show new errors
121 | apex.message.showErrors([
122 | {
123 | type: "error",
124 | location: ["page"],
125 | message: pData.message,
126 | unsafe: false
127 | }
128 | ]);
129 | }
130 | }
131 | }
132 | }
133 |
134 | // Error callback called when the Ajax call fails
135 | function _error( pjqXHR, pTextStatus, pErrorThrown ) {
136 | da.handleAjaxErrors( pjqXHR, pTextStatus, pErrorThrown, resumeCallback );
137 | }
138 |
139 | var lSpinner$;
140 | var uniqueId = new Date().getTime();
141 |
142 | if(loaderSettings.showLoader) {
143 | switch(loaderSettings.loaderType){
144 | case 'spinner':
145 | apex.util.delayLinger.start(uniqueId, function() {
146 | lSpinner$ = apexutils.showSpinner(loaderSettings.loaderPosition, false);
147 | });
148 | break;
149 | case 'spinnerandoverlay':
150 | apex.util.delayLinger.start(uniqueId, function() {
151 | lSpinner$ = apexutils.showSpinner(loaderSettings.loaderPosition, true);
152 | });
153 | break;
154 | default:
155 | break;
156 | }
157 | }
158 |
159 | var handle_spinner = function(){
160 | if(loaderSettings.showLoader){
161 | apex.util.delayLinger.finish(uniqueId, function(){
162 | if(lSpinner$){
163 | lSpinner$.remove();
164 | }
165 | });
166 | }
167 | };
168 |
169 | var clobToSubmit;
170 |
171 | if(clobSettings.submitClob){
172 | switch(clobSettings.submitClobFrom){
173 | case 'pageitem':
174 | clobToSubmit = item(clobSettings.submitClobItem).getValue();
175 | break;
176 | case 'javascriptvariable':
177 | var toSubmit = window[clobSettings.submitClobVariable];
178 |
179 | if(toSubmit instanceof Object){
180 | clobToSubmit = JSON.stringify(toSubmit);
181 | } else {
182 | clobToSubmit = toSubmit;
183 | }
184 | break;
185 | default:
186 | break;
187 | }
188 | }
189 |
190 | server.plugin(action.ajaxIdentifier,
191 | {
192 | pageItems : pageItems.itemsToSubmit, // Already in jQuery selector syntax
193 | p_clob_01 : clobToSubmit
194 | },
195 | {
196 | dataType : 'json',
197 | loadingIndicator: pageItems.itemsToReturn, // Displayed for all "Page Items to Return"
198 | success : function(pData){
199 | handle_spinner();
200 | _handleResponse(pData);
201 | },
202 | error : function(pjqXHR, pTextStatus, pErrorThrown){
203 | handle_spinner();
204 | _error( pjqXHR, pTextStatus, pErrorThrown );
205 | },
206 | async : !sync,
207 | target : this.browserEvent.target
208 | }
209 | );
210 | };
211 | })(apex.da, apex.server, apex.item, apex.jQuery);
--------------------------------------------------------------------------------
/src/plsql/render_ajax.sql:
--------------------------------------------------------------------------------
1 | function render
2 | ( p_dynamic_action in apex_plugin.t_dynamic_action
3 | , p_plugin in apex_plugin.t_plugin
4 | )
5 | return apex_plugin.t_dynamic_action_render_result
6 | is
7 | l_result apex_plugin.t_dynamic_action_render_result;
8 |
9 | --attribute_01 is the plsql code. not needed in the render function
10 |
11 | l_items_to_submit varchar2(4000) := apex_plugin_util.item_names_to_jquery(p_dynamic_action.attribute_02, p_dynamic_action);
12 | l_items_to_return varchar2(4000) := apex_plugin_util.item_names_to_jquery(p_dynamic_action.attribute_03, p_dynamic_action);
13 |
14 | --attribute_04 is the success message. not needed in the render function
15 | --attribute_05 is the error message. not needed in the render function
16 |
17 | l_loader varchar2(4000) := p_dynamic_action.attribute_06;
18 | l_loader_position varchar2(4000) := p_dynamic_action.attribute_07;
19 |
20 | l_submit_clob varchar2(4000) := p_dynamic_action.attribute_08;
21 | l_submit_clob_item varchar2(4000) := p_dynamic_action.attribute_09;
22 | l_submit_clob_variable varchar2(4000) := p_dynamic_action.attribute_10;
23 |
24 | l_return_clob varchar2(4000) := p_dynamic_action.attribute_11;
25 | l_return_clob_item varchar2(4000) := p_dynamic_action.attribute_12;
26 | l_return_clob_variable varchar2(4000) := p_dynamic_action.attribute_13;
27 |
28 | --extra options
29 | l_suppress_change_event boolean := instr(p_dynamic_action.attribute_15, 'suppressChangeEvent') > 0;
30 | l_show_error_as_alert boolean := instr(p_dynamic_action.attribute_15, 'showErrorAsAlert') > 0;
31 | l_sync boolean := apex_application.g_compatibility_mode < 5.1;
32 |
33 | begin
34 |
35 | l_result.javascript_function := 'apexutils.executePlSqlCode';
36 | l_result.ajax_identifier := apex_plugin.get_ajax_identifier;
37 |
38 | if apex_application.g_debug then
39 | apex_plugin_util.debug_dynamic_action
40 | ( p_plugin => p_plugin
41 | , p_dynamic_action => p_dynamic_action
42 | );
43 | end if;
44 |
45 | --attribute_01: regular items to submit/return
46 | l_result.attribute_01 := '{' || apex_javascript.add_attribute( 'itemsToSubmit', l_items_to_submit, false )
47 | || apex_javascript.add_attribute( 'itemsToReturn', l_items_to_return, false, false ) ||
48 | '}';
49 |
50 | --attribute_02: loader
51 | l_result.attribute_02 := '{' || apex_javascript.add_attribute( 'showLoader' , l_loader is not null, false)
52 | || apex_javascript.add_attribute( 'loaderType' , l_loader , false)
53 | || apex_javascript.add_attribute( 'loaderPosition', l_loader_position , false, false) ||
54 | '}';
55 |
56 | --attribute_03: clob to submit/return
57 | l_result.attribute_03 := '{' || apex_javascript.add_attribute( 'submitClob' , l_submit_clob is not null, false)
58 | || apex_javascript.add_attribute( 'submitClobFrom' , l_submit_clob)
59 | || apex_javascript.add_attribute( 'submitClobItem' , l_submit_clob_item)
60 | || apex_javascript.add_attribute( 'submitClobVariable', l_submit_clob_variable)
61 | || apex_javascript.add_attribute( 'returnClob' , l_return_clob is not null, false)
62 | || apex_javascript.add_attribute( 'returnClobInto' , l_return_clob)
63 | || apex_javascript.add_attribute( 'returnClobItem' , l_return_clob_item)
64 | || apex_javascript.add_attribute( 'returnClobVariable', l_return_clob_variable, false, false) ||
65 | '}';
66 |
67 | --attribute_05: extra options
68 | l_result.attribute_05 := '{' || apex_javascript.add_attribute('suppressChangeEvent', l_suppress_change_event, false)
69 | || apex_javascript.add_attribute('showErrorAsAlert' , l_show_error_as_alert , false)
70 | || apex_javascript.add_attribute('sync' , l_sync , false, false) ||
71 | '}';
72 |
73 | return l_result;
74 | end render;
75 |
76 | function ajax
77 | ( p_dynamic_action in apex_plugin.t_dynamic_action
78 | , p_plugin in apex_plugin.t_plugin
79 | )
80 | return apex_plugin.t_dynamic_action_ajax_result
81 | is
82 | l_statement varchar2(32767) := p_dynamic_action.attribute_01;
83 | l_items_to_return varchar2(4000) := apex_plugin_util.cleanup_item_names(p_dynamic_action.attribute_03);
84 |
85 | l_return_clob boolean := p_dynamic_action.attribute_11 is not null;
86 |
87 | l_success_message varchar2(4000) := p_dynamic_action.attribute_04;
88 | l_error_message varchar2(4000) := p_dynamic_action.attribute_05;
89 |
90 | l_message varchar2(4000);
91 |
92 | l_item_names apex_application_global.vc_arr2;
93 |
94 | l_result apex_plugin.t_dynamic_action_ajax_result;
95 |
96 | begin
97 |
98 | apex_plugin_util.execute_plsql_code(l_statement);
99 |
100 | apex_json.initialize_output;
101 | apex_json.open_object;
102 |
103 | if l_items_to_return is not null then
104 | l_item_names := apex_util.string_to_table( p_string => l_items_to_return
105 | , p_separator => ','
106 | );
107 | apex_json.open_array('items');
108 |
109 | for i in 1 .. l_item_names.count loop
110 | apex_json.open_object;
111 | apex_json.write
112 | ( p_name => 'id'
113 | , p_value => apex_plugin_util.item_names_to_dom
114 | ( p_item_names => l_item_names(i)
115 | , p_dynamic_action => p_dynamic_action
116 | )
117 | );
118 | apex_json.write('value', V( l_item_names(i)) );
119 | apex_json.close_object;
120 | end loop;
121 |
122 | apex_json.close_array;
123 | end if;
124 |
125 | if l_return_clob then
126 | apex_json.write('clob', apex_application.g_clob_01);
127 | end if;
128 |
129 | apex_json.write('status', 'success');
130 |
131 | l_message := case
132 | when apex_application.g_x01 is not null
133 | then apex_application.g_x01
134 | else l_success_message
135 | end;
136 | apex_json.write('message', l_message);
137 |
138 | apex_json.close_object;
139 |
140 | return l_result;
141 |
142 | exception when others then
143 | rollback;
144 |
145 | apex_json.initialize_output;
146 | apex_json.open_object;
147 | apex_json.write('status', 'error');
148 |
149 | l_message := case
150 | when apex_application.g_x02 is not null
151 | then apex_application.g_x02
152 | else l_error_message
153 | end;
154 |
155 | l_message := replace(l_message, '#SQLCODE#' , apex_escape.html(SQLCODE));
156 | l_message := replace(l_message, '#SQLERRM#' , apex_escape.html(SQLERRM));
157 | l_message := replace(l_message, '#SQLERRM_TEXT#', apex_escape.html(substr(SQLERRM, instr(SQLERRM, ':')+1)));
158 |
159 | apex_json.write('message', l_message);
160 |
161 | apex_json.close_object;
162 |
163 | return l_result;
164 | end ajax;
--------------------------------------------------------------------------------