如何用Ajax刷新ORACLE Apex中的区域-基于徽章列表[插件]中的选择

时间:2019-09-20 18:09:26

标签: oracle-apex oracle-apex-18.2

我有一个徽章列表插件,可以返回一些物品:

徽章列表插件的SQL如下:

STUDY_MV AS 
(

    SELECT /* MATERIALIZE */
    * FROM VW_GRET_CTA_STUDIES  
    WHERE GRET_ID = :P14_GRET_ID
    AND STUDY_CODE = :P14_STUDY_CODE   
    AND VARIATION_REQUEST_ID IS NULL
    AND APPLICATION_TYPE = 'Clinical Trial Application'
)
select
    '1) Despatched CTA' as label,
    (SELECT COUNT(DISTINCT REGISTRATION_UID) FROM STUDY_MV 
         WHERE 
        STUDY_STATUS = 'Despatched'
    ) as value,  
    'Despatched' AS STUDY_STATUS,

    APEX_PAGE.GET_URL (
            p_page   => 15,
            p_items  => 'P15_GRET_ID,P15_PREVIOUS_PAGE,P15_STUDY_CODE,P15_STUDY_STATUS',
            p_values => :P14_GRET_ID || ',14,' || :P14_STUDY_CODE || ',Despatched')  as url
from dual
UNION
select
    '2) Submitted CTA' as label,
    (SELECT COUNT(DISTINCT REGISTRATION_UID) FROM STUDY_MV 

         WHERE 
        STUDY_STATUS = 'Submitted'
    ) as value,  
    'Submitted' AS STUDY_STATUS,

    APEX_PAGE.GET_URL (
            p_page   => 15,
            p_items  => 'P15_GRET_ID,P15_PREVIOUS_PAGE,P15_STUDY_CODE,P15_STUDY_STATUS',
            p_values => :P14_GRET_ID || ',14,' || :P14_STUDY_CODE || ',Submitted')  as url
from dual

这有效...

我本来是使用URL转到另一个页面(第15页)的,并且正在向其传递参数...但是现在我需要基于同一页面上的另一个区域进行刷新(ajax /动态操作)在徽章列表中的选择上。也就是说,如果他们单击“提交的”包,则同一页面上的交互式网格将通过ajax刷新以仅显示“提交的”记录。

交互式网格具有以下SQL:

SELECT
    DISTINCT
    reg_flag_passive,
    study_status,
    registration_uid,
    application_stage,
    application_type,
    lu_withdrawn_dt,
    country_display_label,
    authorization_status,
    registration_name_details,
    registration_number,
    reg_remarks,
    region,
    preferred_trade_name,
    lu_despatched_dt, 
    LU_SUBMITTED_DT,
    lu_resubmitted_dt,
    lu_approved_dt,
    lu_non_submission_approval_dt,
    lu_approved_inc_non_sub_year,
    lu_approved_inc_non_sub_dt,
    lu_cancelled_dt,
    lu_report_due_dt,
    lu_rejected_dt,
    lu_planned_submission_dt, 
    LU_EXPECTED_APPROVAL_DT,
    cta_ind_no,
    study_code,
    gret_id
FROM
    vw_gret_cta_studies WHERE STUDY_CODE = :P14_STUDY_CODE AND GRET_ID = :P14_GRET_ID
    AND VARIATION_REQUEST_ID IS NULL
    AND APPLICATION_TYPE = 'Clinical Trial Application'
    AND 
    1 = (CASE WHEN :P14_STUDY_STATUS IS NULL THEN 1 ELSE CASE WHEN STUDY_STATUS = :P14_STUDY_STATUS THEN 1 ELSE 0 END END)

我需要做的是::P14_STUDY_STATUS页面项目进行会话,并在徽章列表插件中单击所选的Study_STATUS值,然后刷新交互式网格区域-这将拾取:查询中的P14_STUDY_STATUS值。

我猜想为了通过javascript将内容写入会话,然后刷新区域(例如,调用动态动作来执行此操作),那么我可能需要修改在徽章列表SQL中生成的URL,以进行JavaScript通话?但是根本没有运气。

0 个答案:

没有答案