Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

APEX 5.1: using procedures in item type plugins

Nick BuytaertFeb 10 2017 — edited Feb 23 2017

Hello,

In APEX 5.1, item type plugins must implement a render and AJAX procedure in order to be used in an Interactive Grid column. I have tried to transform the (deprecated) plugin functions into procedures, but I'm having an issue with the AJAX procedure.

I'm not sure whether I have implemented the procedures correctly. The help text for the render procedure says the following:

Item Type Plug-in Render Procedures must implement the following interface:

procedure <name of procedure> (

    p_item   in            apex_plugin.t_item,

    p_plugin in            apex_plugin.t_plugin,

    p_param  in            apex_plugin.t_item_render_param,

    p_result in out nocopy apex_plugin.t_item_render_result )

According to the APEX documentation, the APEX_PLUGIN.T_ITEM and APEX_PLUGIN.T_ITEM_RENDER_RESULT types do not exist. Another remark: the APEX_PLUGIN.T_ITEM_RENDER_PARAM type is undocumented.

Anyway, I ended up using the following interface:

procedure render(

    p_item   in            apex_plugin.t_page_item,

    p_plugin in            apex_plugin.t_plugin,

    p_param  in            apex_plugin.t_item_render_param,

    p_result in out nocopy apex_plugin.t_page_item_render_result

  )

The help text in APEX for the AJAX procedure also includes unexisting parameters.

Item Type Plug-in Ajax Procedures must implement the following interface:

procedure <name of procedure> (

    p_item   in            apex_plugin.t_item,

    p_plugin in            apex_plugin.t_plugin,

    p_param  in            apex_plugin.t_item_ajax_param,

    p_result in out nocopy apex_plugin.t_item_ajax_result )

I ended up implementing the following interface.

procedure ajax(

    p_item   in            apex_plugin.t_page_item,

    p_plugin in            apex_plugin.t_plugin,

    p_param  in            apex_plugin.t_item_ajax_param,

    p_result in out nocopy apex_plugin.t_page_item_ajax_result

  )

There seems to be a problem with this implementation. When I enable lazy loading for a Select2 page item, it executes the AJAX procedure in the background, but this is the JSON response I get back:

Error in PLSQL code raised during plug-in processing.

ORA-06550: line 776, column 1:

PLS-00306: wrong number or types of arguments in call to &#x27;RENDER&#x27;

ORA-06550: line 776, column 1:

PLS-00306: wrong number or types of arguments in call to &#x27;RENDER&#x27;

ORA-06550: line 776, column 1:

PL&#x2F;SQL: Statement ignored

It executes the render procedure instead of the AJAX procedure. The procedure parameters seem to be the problem, but I have no idea how to fix this. Can somebody help me out?

Thanks,

Nick

This post has been answered by Patrick Wolf-Oracle on Feb 22 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2017
Added on Feb 10 2017
4 comments
1,446 views