53.3 REFRESH Procedure
This procedure refreshes a component.
Syntax
APEX_SHARED_COMPONENT.REFRESH (
p_component_type IN t_component_type,
p_component_id IN NUMBER )
Parameters
Parameter | Description |
---|---|
p_component_type |
Component type to refresh. |
p_component_id |
Component ID to refresh. |
Example
The following example refreshes all the subscribed components from application 100
, which are out of date.
BEGIN
-- set the current workspace, only required when executing this API outside
APEX environment
apex_util.set_workspace ( p_workspace => 'WORKSPACE_NAME' );
-- refresh all the components in an app
FOR l_component IN (
SELECT component_type,
component_id
FROM apex_subscribed_components
WHERE application_id = 100
AND Subscription_status <> apex_shared_component.c_status_up_to_date )
LOOP
apex_shared_component.refresh (
p_component_type => l_component.component_type,
p_component_id => l_component.component_id );
END LOOP;
COMMIT;
END;
Parent topic: APEX_SHARED_COMPONENT