set define off set verify off set serveroutput on size 1000000 set feedback off WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK begin wwv_flow.g_import_in_progress := true; end; / -- AAAA PPPPP EEEEEE XX XX -- AA AA PP PP EE XX XX -- AA AA PP PP EE XX XX -- AAAAAAAAAA PPPPP EEEE XXXX -- AA AA PP EE XX XX -- AA AA PP EE XX XX -- AA AA PP EEEEEE XX XX prompt Set Credentials... begin -- Assumes you are running the script connected to SQL*Plus as the Oracle user APEX_040000 or as the owner (parsing schema) of the application. wwv_flow_api.set_security_group_id(p_security_group_id=>nvl(wwv_flow_application_install.get_workspace_id,6946861628284843435)); end; / begin wwv_flow.g_import_in_progress := true; end; / begin select value into wwv_flow_api.g_nls_numeric_chars from nls_session_parameters where parameter='NLS_NUMERIC_CHARACTERS'; end; / begin execute immediate 'alter session set nls_numeric_characters=''.,'''; end; / begin wwv_flow.g_browser_language := 'de'; end; / prompt Check Compatibility... begin -- This date identifies the minimum version required to import this file. wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2010.05.13'); end; / prompt Set Application ID... begin -- SET APPLICATION ID wwv_flow.g_flow_id := nvl(wwv_flow_application_install.get_application_id,26459); wwv_flow_api.g_id_offset := nvl(wwv_flow_application_install.get_offset,0); null; end; / prompt ...plugins -- --application/shared_components/plugins/region_type/com_oracle_de_cczarski_labelcloudplugin begin wwv_flow_api.create_plugin ( p_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_type => 'REGION TYPE' ,p_name => 'COM.ORACLE.DE.CCZARSKI.LABELCLOUDPLUGIN' ,p_display_name => 'Label Cloud' ,p_image_prefix => '#PLUGIN_PREFIX#' ,p_plsql_code => 'function prepare_sql ('||chr(10)|| ' p_sql in varchar2, '||chr(10)|| ' p_max_rows in number,'||chr(10)|| ' p_order in number'||chr(10)|| ' ) return varchar2 is'||chr(10)|| ' v_new_sql varchar2(32767) := ''''; '||chr(10)|| ' v_sql_handler apex_plugin_util.t_sql_handler;'||chr(10)|| ' v_dtlist wwv_flow_global.vc_arr2;'||chr(10)|| ' begin'||chr(10)|| ' v_dtlist(1) := apex_plugin_util.c_data_type_varchar2;'||chr(10)|| ' v_dtlist(2) := apex_plugin_util.c_data_type_varchar2;'||chr(10)|| ' v_dtlist(3)'|| ' := apex_plugin_util.c_data_type_number;'||chr(10)|| ''||chr(10)|| ''||chr(10)|| ' v_sql_handler := apex_plugin_util.get_sql_handler('||chr(10)|| ' p_sql_statement => p_sql,'||chr(10)|| ' p_min_columns => 3,'||chr(10)|| ' p_max_columns => 3,'||chr(10)|| ' p_data_type_list => v_dtlist,'||chr(10)|| ' p_component_name => null'||chr(10)|| ' );'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''SQL Handler opened for query: ''||p_sql);'||chr(10)|| ' end if;'||chr(10)|| ' '||chr(10)|| ' v_new_sql := v_new_sql |'|| '| ''select '';'||chr(10)|| ' v_new_sql := v_new_sql || ''"''||v_sql_handler.column_list(1).col_name || ''", '';'||chr(10)|| ' v_new_sql := v_new_sql || ''"''||v_sql_handler.column_list(2).col_name || ''", '';'||chr(10)|| ' v_new_sql := v_new_sql || ''"''||v_sql_handler.column_list(3).col_name || ''" '';'||chr(10)|| ' v_new_sql := v_new_sql || ''from ('';'||chr(10)|| ' v_new_sql := v_new_sql || ''select '';'||chr(10)|| ' v_new_sql := v_new_sql || ''"''||v_sql_handler.column_li'|| 'st(1).col_name || ''", '';'||chr(10)|| ' v_new_sql := v_new_sql || ''"''||v_sql_handler.column_list(2).col_name || ''", '';'||chr(10)|| ' v_new_sql := v_new_sql || ''"''||v_sql_handler.column_list(3).col_name || ''" '';'||chr(10)|| ' v_new_sql := v_new_sql || ''from (''||p_sql||'') '';'||chr(10)|| ' if p_max_rows is not null then'||chr(10)|| ' v_new_sql := v_new_sql || ''where rownum <= '' ||p_max_rows;'||chr(10)|| ' end if;'||chr(10)|| ' v_new_sql := v_new_sql || '') '';'||chr(10)|| ' if p_'|| 'order = 1 then '||chr(10)|| ' v_new_sql := v_new_sql || ''order by 3 desc'';'||chr(10)|| ' elsif p_order = 2 then '||chr(10)|| ' v_new_sql := v_new_sql || ''order by dbms_random.value'';'||chr(10)|| ' end if;'||chr(10)|| ''||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''New SQL query computed: ''||v_new_sql);'||chr(10)|| ' end if;'||chr(10)|| ''||chr(10)|| ' apex_plugin_util.free_sql_handler('||chr(10)|| ' p_sql_handler => v_sql_handler'||chr(10)|| ' );'||chr(10)|| ''||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_fl'|| 'ow.debug(''SQL handler freed: ''||v_new_sql);'||chr(10)|| ' end if;'||chr(10)|| ' return v_new_sql;'||chr(10)|| ' exception when others then '||chr(10)|| ' wwv_flow.debug(sqlerrm);'||chr(10)|| ' wwv_flow.debug(dbms_utility.format_error_stack);'||chr(10)|| ' begin'||chr(10)|| ' apex_plugin_util.free_sql_handler('||chr(10)|| ' p_sql_handler => v_sql_handler'||chr(10)|| ' );'||chr(10)|| ' exception when others then null;'||chr(10)|| ' end;'||chr(10)|| ' end prepare_sql;'||chr(10)|| ''||chr(10)|| ' function calculate_color('||chr(10)|| ' p_min_col var'|| 'char2,'||chr(10)|| ' p_max_col varchar2,'||chr(10)|| ' p_min_val number,'||chr(10)|| ' p_max_val number,'||chr(10)|| ' p_val number'||chr(10)|| ' ) return varchar2 is '||chr(10)|| ' v_min_red pls_integer := to_number(substr(p_min_col, 2, 2), ''XX'');'||chr(10)|| ' v_max_red pls_integer := to_number(substr(p_max_col, 2, 2), ''XX'');'||chr(10)|| ' v_min_blu pls_integer := to_number(substr(p_min_col, 6, 2), ''XX'');'||chr(10)|| ' v_max_blu pls_integer := to_number(substr(p_max_col, 6, 2), ''XX'|| ''');'||chr(10)|| ' v_min_gre pls_integer := to_number(substr(p_min_col, 4, 2), ''XX'');'||chr(10)|| ' v_max_gre pls_integer := to_number(substr(p_max_col, 4, 2), ''XX'');'||chr(10)|| ' v_red pls_integer;'||chr(10)|| ' v_gre pls_integer;'||chr(10)|| ' v_blu pls_integer;'||chr(10)|| ' begin'||chr(10)|| ' v_red := v_min_red + ((v_max_red - v_min_red) * ((p_val - p_min_val) / (p_max_val - p_min_val)));'||chr(10)|| ' v_gre := v_min_gre + ((v_max_gre - v_min_gre) * ((p_val - p_min_val) / '|| '(p_max_val - p_min_val)));'||chr(10)|| ' v_blu := v_min_blu + ((v_max_blu - v_min_blu) * ((p_val - p_min_val) / (p_max_val - p_min_val)));'||chr(10)|| ' return ''#''||ltrim(to_char(v_red, ''0X''))||ltrim(to_char(v_gre, ''0X''))||ltrim(to_char(v_blu, ''0X''));'||chr(10)|| ' '||chr(10)|| ' end calculate_color;'||chr(10)|| ''||chr(10)|| ' procedure generate_cloud('||chr(10)|| ' p_sql in varchar2,'||chr(10)|| ' p_max_size in number default 20,'||chr(10)|| ' p_min_size in number default 10,'|| ''||chr(10)|| ' p_size_unit in varchar2 default ''pt'','||chr(10)|| ' p_max_color in varchar2 default ''#ff0000'','||chr(10)|| ' p_min_color in varchar2 default ''#000000'','||chr(10)|| ' p_max_labels in number default null,'||chr(10)|| ' p_link_attrs in varchar2 default null,'||chr(10)|| ' p_order in number default 1,'||chr(10)|| ' p_escapehtml in number default 1,'||chr(10)|| ' p_nodatamsg in varchar2 default ''No data found.'''||chr(10)|| ' ) is '||chr(10)|| ' v_label varchar2(32767);'|| ''||chr(10)|| ' v_link varchar2(32767);'||chr(10)|| ' v_value varchar2(4000);'||chr(10)|| ' v_min_value number;'||chr(10)|| ' v_max_value number;'||chr(10)|| ''||chr(10)|| ' v_datafound boolean := false;'||chr(10)|| ''||chr(10)|| ' v_sql varchar2(32767);'||chr(10)|| ' v_sql_handler apex_plugin_util.t_sql_handler;'||chr(10)|| ' v_dtlist wwv_flow_global.vc_arr2;'||chr(10)|| ' v_sql_values apex_plugin_util.t_column_value_list;'||chr(10)|| ' begin'||chr(10)|| ' v_dtlist(1) := apex_plugin_util.c_data_type_varchar2;'||chr(10)|| ''|| ' v_dtlist(2) := apex_plugin_util.c_data_type_varchar2;'||chr(10)|| ' v_dtlist(3) := apex_plugin_util.c_data_type_number;'||chr(10)|| ''||chr(10)|| ' v_sql := prepare_sql(p_sql, p_max_labels, p_order);'||chr(10)|| ' v_sql_handler := apex_plugin_util.get_sql_handler('||chr(10)|| ' p_sql_statement => v_sql,'||chr(10)|| ' p_min_columns => 3,'||chr(10)|| ' p_max_columns => 3,'||chr(10)|| ' p_data_type_list => v_dtlist,'||chr(10)|| ' p_component_name => null'||chr(10)|| ' );'||chr(10)|| ''||chr(10)|| ' if wwv_'|| 'flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''get_sql_handler called for query: ''||v_sql);'||chr(10)|| ' end if;'||chr(10)|| ''||chr(10)|| ' apex_plugin_util.prepare_query('||chr(10)|| ' p_sql_handler => v_sql_handler'||chr(10)|| ' );'||chr(10)|| ''||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''prepare_query called.'');'||chr(10)|| ' end if;'||chr(10)|| ' '||chr(10)|| ' v_sql_values := apex_plugin_util.get_data('||chr(10)|| ' p_sql_handler => v_sql_handler'||chr(10)|| ' );'||chr(10)|| ''||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' '|| ' wwv_flow.debug(''get_data called.'');'||chr(10)|| ' end if;'||chr(10)|| ' '||chr(10)|| ' apex_plugin_util.free_sql_handler('||chr(10)|| ' p_sql_handler => v_sql_handler'||chr(10)|| ' );'||chr(10)|| ''||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''free_handler called.'');'||chr(10)|| ' end if;'||chr(10)|| ''||chr(10)|| ' begin'||chr(10)|| ' -- determine minimum and maximum value'||chr(10)|| ' v_max_value := v_sql_values(3)(1);'||chr(10)|| ' v_min_value := v_sql_values(3)(1);'||chr(10)|| ' v_datafound := true;'||chr(10)|| ' '|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(v_sql_values(3).count || '' row(s) returned.'');'||chr(10)|| ' end if;'||chr(10)|| ' exception'||chr(10)|| ' when NO_DATA_FOUND then '||chr(10)|| ' v_datafound := false;'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''no rows returned.'');'||chr(10)|| ' end if;'||chr(10)|| ' end;'||chr(10)|| ' if v_datafound then'||chr(10)|| ' for i in 2..v_sql_values(3).count loop'||chr(10)|| ' if to_number(v_sql_values(3)(i)) '|| '> v_max_value then'||chr(10)|| ' v_max_value := to_number(v_sql_values(3)(i));'||chr(10)|| ' end if;'||chr(10)|| ' if to_number(v_sql_values(3)(i)) < v_min_value then'||chr(10)|| ' v_min_value := to_number(v_sql_values(3)(i));'||chr(10)|| ' end if;'||chr(10)|| ' end loop;'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''determined minimum value: ''||v_min_value);'||chr(10)|| ' wwv_flow.debug(''determined maximum value: ''||v_max_v'|| 'alue);'||chr(10)|| ' end if;'||chr(10)|| ''||chr(10)|| ' for i in 1..v_sql_values(1).count loop'||chr(10)|| ' v_label := v_sql_values(1)(i);'||chr(10)|| ' v_link := v_sql_values(2)(i);'||chr(10)|| ' v_value := v_sql_values(3)(i);'||chr(10)|| ' '||chr(10)|| ' if p_escapehtml = 1 then '||chr(10)|| ' v_label := apex_plugin_util.escape(v_label, true);'||chr(10)|| ' end if;'||chr(10)|| ' '||chr(10)|| ' if v_link is not null then '||chr(10)|| ' sys.htp.p('''');'||chr(10)|| ' end if;'||chr(10)|| ' sys.htp.p('||chr(10)|| ' ''''||'||chr(10)|| ' v_label ||'||chr(10)|| ' '''''||chr(10)|| ' );'||chr(10)|| ' if v_link is not null then '||chr(10)|| ' sys.htp.p('''');'||chr(10)|| ' end if;'||chr(10)|| ' sys.htp.p('''');'||chr(10)|| ' end loop;'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''labels rendered.'');'||chr(10)|| ' end if;'||chr(10)|| ' else'||chr(10)|| ' sys.htp.p(p_nodatamsg);'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''no data found messag'|| 'e rendered.'');'||chr(10)|| ' end if;'||chr(10)|| ' end if;'||chr(10)|| ' exception '||chr(10)|| ' when others then '||chr(10)|| ' begin'||chr(10)|| ' apex_plugin_util.free_sql_handler('||chr(10)|| ' p_sql_handler => v_sql_handler'||chr(10)|| ' ); '||chr(10)|| ' exception when others then null;'||chr(10)|| ' end;'||chr(10)|| ' sys.htp.p(''An exception occurred - turn on debug mode to see more information.
'');'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' sys.htp.p(''
''||dbms_utility'||
'.format_error_stack||''
'');'||chr(10)|| ' end if;'||chr(10)|| ' wwv_flow.debug(sqlerrm);'||chr(10)|| ' wwv_flow.debug(dbms_utility.format_error_stack);'||chr(10)|| ' end generate_cloud;'||chr(10)|| ''||chr(10)|| ' function apexplugin_render_ajax ('||chr(10)|| ' p_region in apex_plugin.t_region,'||chr(10)|| ' p_plugin in apex_plugin.t_plugin'||chr(10)|| ') return apex_plugin.t_region_ajax_result'||chr(10)|| ' is'||chr(10)|| ' -- It''s better to have named variables instead of u'|| 'sing the generic ones,'||chr(10)|| ' -- makes the code more readable'||chr(10)|| ' l_mincolor apex_application_page_regions.attribute_01%type := p_region.attribute_01;'||chr(10)|| ' l_maxcolor apex_application_page_regions.attribute_02%type := p_region.attribute_02;'||chr(10)|| ' l_minsize apex_application_page_regions.attribute_03%type := p_region.attribute_03;'||chr(10)|| ' l_maxsize apex_application_page_reg'|| 'ions.attribute_04%type := p_region.attribute_04;'||chr(10)|| ' l_linkattrs apex_application_page_regions.attribute_05%type := p_region.attribute_05;'||chr(10)|| ' l_order apex_application_page_regions.attribute_06%type := p_region.attribute_06;'||chr(10)|| ' l_escapehtml apex_application_page_regions.attribute_07%type := p_region.attribute_07;'||chr(10)|| ' l_div_attributes apex_application_page_regions.attribu'|| 'te_08%type := p_region.attribute_08;'||chr(10)|| ' l_items_submit apex_application_page_regions.attribute_09%type := p_region.attribute_09;'||chr(10)|| ' l_nodatamsg apex_application_page_regions.attribute_10%type := p_region.attribute_10;'||chr(10)|| ' begin'||chr(10)|| ' generate_cloud('||chr(10)|| ' p_sql => p_region.source,'||chr(10)|| ' p_min_color => l_mincolor,'||chr(10)|| ' p_max_color => l_maxcolor,'||chr(10)|| ' p_max_size => l_maxsize,'||chr(10)|| ' '|| ' p_min_size => l_minsize,'||chr(10)|| ' p_link_attrs => l_linkattrs,'||chr(10)|| ' p_order => case when l_order = ''RANDOM'' then 2 else 1 end,'||chr(10)|| ' p_escapehtml => case when l_escapehtml = ''Y'' then 1 else 0 end,'||chr(10)|| ' p_nodatamsg => l_nodatamsg'||chr(10)|| ' );'||chr(10)|| ' return null;'||chr(10)|| ' end apexplugin_render_ajax; '||chr(10)|| ''||chr(10)|| ' function apexplugin_render ('||chr(10)|| ' p_region in apex_plugin.t_region,'||chr(10)|| ' p_plugin '|| ' in apex_plugin.t_plugin,'||chr(10)|| ' p_is_printer_friendly in boolean '||chr(10)|| ') return apex_plugin.t_region_render_result is '||chr(10)|| ' l_mincolor apex_application_page_regions.attribute_01%type := p_region.attribute_01;'||chr(10)|| ' l_maxcolor apex_application_page_regions.attribute_02%type := p_region.attribute_02;'||chr(10)|| ' l_minsize apex_application_page_regions.attribute_03%type := p_region.attribu'|| 'te_03;'||chr(10)|| ' l_maxsize apex_application_page_regions.attribute_04%type := p_region.attribute_04;'||chr(10)|| ' l_linkattrs apex_application_page_regions.attribute_05%type := p_region.attribute_05;'||chr(10)|| ' l_order apex_application_page_regions.attribute_06%type := p_region.attribute_06;'||chr(10)|| ' l_escapehtml apex_application_page_regions.attribute_07%type := p_region.attribute_07;'||chr(10)|| ' l_div_att'|| 'ributes apex_application_page_regions.attribute_08%type := p_region.attribute_08;'||chr(10)|| ' l_items_submit apex_application_page_regions.attribute_09%type := p_region.attribute_09;'||chr(10)|| ' l_nodatamsg apex_application_page_regions.attribute_10%type := p_region.attribute_10;'||chr(10)|| ''||chr(10)|| ' l_ajax_result apex_plugin.t_region_ajax_result;'||chr(10)|| 'begin'||chr(10)|| ' apex_javascript.add_library ('||chr(10)|| ' p_name => ''labelCloudAj'|| 'ax'','||chr(10)|| ' p_directory => p_plugin.file_prefix,'||chr(10)|| ' p_version => null '||chr(10)|| ' );'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''label cloud javascript added.'');'||chr(10)|| ' end if;'||chr(10)|| ' sys.htp.p('||chr(10)|| ' ''
'''||chr(10)|| ' );'||chr(10)|| ' l_ajax_result := apexplugin_render_ajax(p_region, p_plugin);'||chr(10)|| ' sys.htp.p'|| '(''
'');'||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''DIV container finished.'');'||chr(10)|| ' end if;'||chr(10)|| ''||chr(10)|| ' apex_javascript.add_onload_code (''apex.jQuery("#''||apex_javascript.escape(p_region.static_id)||''").bind("apexrefresh", function() {com_oracle_de_cczarski_labelCloud(''||apex_javascript.add_value(p_region.static_id, true)||apex_javascript.add_value(apex_plugin.get_ajax_identifier, true)||apex_javascr'|| 'ipt.add_value(l_items_submit, false)||'');});'');'||chr(10)|| ''||chr(10)|| ' if wwv_flow.g_debug then '||chr(10)|| ' wwv_flow.debug(''onLoad Code to bind the "refresh" event added.'');'||chr(10)|| ' end if;'||chr(10)|| ' return null;'||chr(10)|| 'end apexplugin_render; '||chr(10)|| '' ,p_render_function => 'apexplugin_render' ,p_ajax_function => 'apexplugin_render_ajax' ,p_standard_attributes => 'SOURCE_SQL:SOURCE_REQUIRED' ,p_sql_min_column_count => 3 ,p_sql_max_column_count => 3 ,p_sql_examples => '

'||chr(10)|| 'Each query must return 3 columns: LABEL, LINK and VALUE. '||chr(10)|| '

'||chr(10)|| '

'||chr(10)|| 'Simple Query example:'||chr(10)|| '

'||chr(10)|| '
'||chr(10)||
'  select ename label, null link, sal value from emp'||chr(10)||
'
'||chr(10)|| '

'||chr(10)|| 'Query with page item example. It''s important to add the items to the Items this region depends on attribute.'||chr(10)|| '

'||chr(10)|| '
'||chr(10)||
'  select ename label, null link, sal value from emp'||chr(10)||
'  where deptno = :P1_DEPTNO'||chr(10)||
'
' ,p_help_text => '

'||chr(10)|| ' Label Cloud Plugin

'||chr(10)|| '

'||chr(10)|| ' Author: Carsten Czarski

'||chr(10)|| '

'||chr(10)|| ' This plugin allows to display table contents as a label cloud (example below). You need to provide a SQL query in the reqion source which selects a label, a link and a value, similar to a chart.  The plugin attributes configure the coloring of the label cloud and the text sizes. The datasource SQL  query must be placed into the Region Source.

'||chr(10)|| '

'||chr(10)|| ' Example:

'||chr(10)|| '

'||chr(10)|| ' SELECT ENAME || ' ('||sal||')' label, NULL link, SAL value FROM EMP
'||chr(10)|| '

'||chr(10)|| ''||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| ' '||chr(10)|| '
'||chr(10)|| '  '||chr(10)|| '  
'||chr(10)|| ' ALLEN (1600) SCOTT (3000) BLAKE (2850) MILLER (1300) FORD (3000) WARD (1250) MARTIN (1250) CLARK (2450) SMITH (800) ADAMS (1100) TURNER (1500) JONES (2975) JAMES (950) KING (5000)
'||chr(10)|| '

'||chr(10)|| '  

'||chr(10)|| '

'||chr(10)|| ' The Width and Height of the Label Cloud might be adjusted in the "DIV container attributes" plugin parameter or in the CSS properties in the standard APEX Region Attributes setting.

'||chr(10)|| '' ,p_version_identifier => '2.0' ); wwv_flow_api.create_plugin_attribute ( p_id => 6816408732515896630 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 1 ,p_display_sequence => 10 ,p_prompt => 'Minimum value color ' ,p_attribute_type => 'TEXT' ,p_is_required => true ,p_default_value => '#000000' ,p_display_length => 7 ,p_max_length => 7 ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| ' Please enter the color for the smallest value in HTML format here (#RRGGBB). Examples:

'||chr(10)|| ''||chr(10)|| '' ); wwv_flow_api.create_plugin_attribute ( p_id => 6816409244635900066 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 2 ,p_display_sequence => 20 ,p_prompt => 'Maximum value color' ,p_attribute_type => 'TEXT' ,p_is_required => true ,p_default_value => '#ff0000' ,p_display_length => 7 ,p_max_length => 7 ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| ' Please enter the color for the highest value in HTML format here (#RRGGBB). Examples:

'||chr(10)|| '
    '||chr(10)|| '
  • #ff0000 (red)
    • '||chr(10)|| '
  • #00ff00 (green)
    • '||chr(10)|| '
  • #000080 (dark-blue)
    • '||chr(10)|| '
  • #ffa080 (orange)
    • '||chr(10)|| '
  • #000000 (black)
    • '||chr(10)|| '
  • #800080 (violet)
    • '||chr(10)|| '
'||chr(10)|| '' ); wwv_flow_api.create_plugin_attribute ( p_id => 6816409723642903547 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 3 ,p_display_sequence => 30 ,p_prompt => 'Minimum value size' ,p_attribute_type => 'INTEGER' ,p_is_required => true ,p_default_value => '10' ,p_display_length => 4 ,p_max_length => 4 ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| ' Text size for the minimum value in pixel (px).

'||chr(10)|| '' ); wwv_flow_api.create_plugin_attribute ( p_id => 6816410229875905299 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 4 ,p_display_sequence => 40 ,p_prompt => 'Maximum value size' ,p_attribute_type => 'INTEGER' ,p_is_required => true ,p_default_value => '30' ,p_display_length => 4 ,p_max_length => 4 ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| ' Text size for the maximum value in pixel (px).

'||chr(10)|| '' ); wwv_flow_api.create_plugin_attribute ( p_id => 6816410842689908978 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 5 ,p_display_sequence => 50 ,p_prompt => 'Link attributes' ,p_attribute_type => 'TEXT' ,p_is_required => false ,p_display_length => 100 ,p_max_length => 200 ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| ' Enter optional link attributes here (i.e. target="_blank")

'||chr(10)|| '' ); wwv_flow_api.create_plugin_attribute ( p_id => 6816411315461910656 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 6 ,p_display_sequence => 60 ,p_prompt => 'Order method' ,p_attribute_type => 'SELECT LIST' ,p_is_required => true ,p_default_value => 'RANDOM' ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| ' Choose the ordering method inside the label cloud.

'||chr(10)|| '' ); wwv_flow_api.create_plugin_attr_value ( p_id => 6816411918578911479 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_attribute_id => 6816411315461910656 + wwv_flow_api.g_id_offset ,p_display_sequence => 10 ,p_display_value => 'Random' ,p_return_value => 'RANDOM' ); wwv_flow_api.create_plugin_attr_value ( p_id => 6816412320656912092 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_attribute_id => 6816411315461910656 + wwv_flow_api.g_id_offset ,p_display_sequence => 20 ,p_display_value => 'Descending' ,p_return_value => 'DESC' ); wwv_flow_api.create_plugin_attribute ( p_id => 6208172730262186796 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 7 ,p_display_sequence => 70 ,p_prompt => 'Escape HTML' ,p_attribute_type => 'CHECKBOX' ,p_is_required => false ,p_default_value => 'Y' ,p_is_translatable => false ,p_help_text => '

Specify wether HTML tags in the displayed labels should be escaped (default) or not.

' ); wwv_flow_api.create_plugin_attribute ( p_id => 6208173149309192244 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 8 ,p_display_sequence => 80 ,p_prompt => 'DIV Container attributes' ,p_attribute_type => 'TEXT' ,p_is_required => false ,p_default_value => 'style="text-align: center"' ,p_display_length => 100 ,p_max_length => 200 ,p_is_translatable => false ,p_help_text => 'Add HTML attributes for the Label Cloud''s DIV container here. Examples:
'||chr(10)|| '
'||chr(10)|| 'style="width: 300px; text-align: center"' ); wwv_flow_api.create_plugin_attribute ( p_id => 6208175429663243309 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 9 ,p_display_sequence => 90 ,p_prompt => 'Items this region depends on' ,p_attribute_type => 'TEXT' ,p_is_required => false ,p_display_length => 100 ,p_max_length => 200 ,p_is_translatable => false ,p_help_text => '

'||chr(10)|| 'Enter the APEX page items the region content depends on as a comma-separated list. Example:'||chr(10)|| '

'||chr(10)|| '

'||chr(10)|| 'SQL Query:'||chr(10)|| '

'||chr(10)|| '
'||chr(10)||
'select ename label, null link, sal value '||chr(10)||
'from emp where deptno = :P1_DEPTNO and SAL > :P1_MIN_SAL'||chr(10)||
'
'||chr(10)|| '

'||chr(10)|| ' Items this region depends on: P1_DEPTNO, P1_MIN_SAL'||chr(10)|| '

' ); wwv_flow_api.create_plugin_attribute ( p_id => 6208177925816289558 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_attribute_scope => 'COMPONENT' ,p_attribute_sequence => 10 ,p_display_sequence => 100 ,p_prompt => 'No data found message' ,p_attribute_type => 'TEXT' ,p_is_required => true ,p_default_value => 'No data found.' ,p_display_length => 100 ,p_max_length => 200 ,p_is_translatable => false ,p_help_text => 'Enter the message to display when the query returns no rows.' ); null; end; / begin wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table; wwv_flow_api.g_varchar2_table(1) := '66756E6374696F6E20636F6D5F6F7261636C655F64655F63637A6172736B695F6C6162656C436C6F75642870526567696F6E49642C2070506C7567696E4E616D652C20704974656D4C69737429207B0D0A202076617220614974656D4C6973743B0D0A20'; wwv_flow_api.g_varchar2_table(2) := '20617065782E6576656E742E74726967676572280D0A20202020247828226C6162656C636C6F75645F706C7567696E5F222B70526567696F6E4964292C0D0A2020202022617065786265666F726572656672657368220D0A2020293B0D0A0D0A20207661'; wwv_flow_api.g_varchar2_table(3) := '72206C416A617852657175657374203D206E65772068746D6C64625F476574280D0A202020206E756C6C2C0D0A202020202476282770466C6F77496427292C200D0A2020202022504C5547494E3D22202B2070506C7567696E4E616D652C0D0A20202020'; wwv_flow_api.g_varchar2_table(4) := '2476282770466C6F7753746570496427290D0A2020293B0D0A202069662028704974656D4C69737420213D20222229207B0D0A20202020614974656D4C697374203D20704974656D4C6973742E73706C697428222C22293B0D0A20202020666F72202876'; wwv_flow_api.g_varchar2_table(5) := '617220693D303B693C614974656D4C6973742E6C656E6774683B692B2B29207B0D0A2020202020206C416A6178526571756573742E61646428614974656D4C6973745B695D2C20247628614974656D4C6973745B695D29293B0D0A202020207D0D0A2020'; wwv_flow_api.g_varchar2_table(6) := '7D0D0A20206C416A6178526571756573742E616464506172616D2827705F6465627567272C20247628277064656275672729293B0D0A2020766172206C416A6178526573756C7420203D206E756C6C3B0D0A20206C416A6178526573756C74203D206C41'; wwv_flow_api.g_varchar2_table(7) := '6A6178526571756573742E67657428293B0D0A2020247828226C6162656C636C6F75645F706C7567696E5F222B70526567696F6E4964292E696E6E657248544D4C203D206C416A6178526573756C743B0D0A2020617065782E6576656E742E7472696767'; wwv_flow_api.g_varchar2_table(8) := '6572280D0A20202020247828226C6162656C636C6F75645F706C7567696E5F222B70526567696F6E4964292C0D0A202020202261706578616674657272656672657368220D0A2020293B0D0A7D0D0A0D0A'; null; end; / begin wwv_flow_api.create_plugin_file ( p_id => 6205650241085728322 + wwv_flow_api.g_id_offset ,p_flow_id => wwv_flow.g_flow_id ,p_plugin_id => 6816408536193888166 + wwv_flow_api.g_id_offset ,p_file_name => 'labelCloudAjax.js' ,p_mime_type => 'application/x-javascript' ,p_file_content => wwv_flow_api.g_varchar2_table ); null; end; / commit; begin execute immediate 'begin dbms_session.set_nls( param => ''NLS_NUMERIC_CHARACTERS'', value => '''''''' || replace(wwv_flow_api.g_nls_numeric_chars,'''''''','''''''''''') || ''''''''); end;'; end; / set verify on set feedback on prompt ...done