Databases Reference
In-Depth Information
1.
Edit the plug-in and scroll down to the Callbacks region. Click on the
AJAX Function Name label to view the help text. Similar to render
functions, AJAX function header templates are provided in the help text.
Copy the function header for region type plug-ins as shown in
Figure 5-22.
Figure 5-22. AJAX function help
2. Paste the function template into the package spec for
pkg_apress_plugins . Name the function f_ajax_rss_reader and compile
the package spec.
3. To register the function with the plug-in, edit the plug-in and scroll down
to the Callbacks section. Enter pkg_apress_plugins.f_ajax_rss_reader in
the AJAX Function Name field. Click the Apply Changes button to save
your change.
The final step is to enter the code for the package body. Edit the package body for
pkg_apress_plugins and copy the following code at the bottom of the package:
484 …
485
486 FUNCTION f_ajax_rss_reader (
487 p_region IN apex_plugin.t_region,
488 p_plugin IN apex_plugin.t_plugin )
489 RETURN apex_plugin.t_region_ajax_result
490 AS
491 -- APEX Application Variables (x01..x10)
492 v_rss_type VARCHAR2(255) := LOWER(apex_application.g_x01);
493 v_rss_id VARCHAR2(255) := apex_application.g_x02;
494
495 -- Region Plugin Attributes
496 v_rss_url apex_application_page_regions.attribute_01%TYPE := p_region.attribute_02;
497
498 -- Other Variables
499 v_author VARCHAR2(255);
500 v_title VARCHAR2(255);
501 v_link VARCHAR2(1000);
 
Search WWH ::




Custom Search