Breadcrumbs Using Page Items

According
to the customer’s requirement, there is a table which contains both parent
parts and child parts in one table. Once we create a part, a link must be
available to create child parts under it. Once we click on that link, the
parent part must be available in the breadcrumb along with the parent parts of
the parent.
Step 1:
Create a tabular
form with source code as
SELECT
nvl(VEHICLE_PART_ID,0) “VEHICLE_PART_ID”,
  “VEHICLE_PART_ID”
VEHICLE_PART_ID_DISPLAY,
  CATEGORY_ID “VEHICLE_TYPE_CODE”,
  “VEHICLE_PART_NAME”,
  IS_ACTIVE “ACTIVE_STATUS”,
NVL(PARENT_PART_ID,
0) AS “PARENT_PART_ID”,
 CASE
    WHEN VEHICLE_PART_ID IS NOT NULL
    THEN ‘<a href=”’
||’f?p=&APP_ID.:5:&SESSION.::&DEBUG.::P5_PARENT_PART_ID,P5_VEHICLE_TYPE,P5_PARENT_PART:’
      || VEHICLE_PART_ID
      ||’,’
      ||CATEGORY_ID
      ||’,’
      ||VEHICLE_PART_NAME
      ||””
      ||’> Minor Parts</a>’
  END “link”
FROM
AP_SY_VM_VHL_PRTS
WHERE CATEGORY_ID
=:P5_VEHICLE_TYPE
AND
((PARENT_PART_ID    =:P5_PARENT_PART_ID
AND
:P5_PARENT_PART_ID <> 0)
OR
(:P5_PARENT_PART_ID = 0
AND PARENT_PART_ID
=0))
Step 2:
Go to Report
Attributes
à Link à Display As à
Standard report Column
As per the query,
it will redirect to the same page by setting the item value.
Step 3:
Create an Display
item for displaying as breadcrumb with the following query
SELECT ‘<a
href=”’
||’f?p=&APP_ID.:5:&SESSION.::&DEBUG.::P5_PARENT_PART_ID,P5_VEHICLE_TYPE:’
  || ‘0,’
  || :P5_VEHICLE_TYPE
  ||””
  ||’>’
  || AP_SY_VM_FN_GET_CTGRY(:P5_VEHICLE_TYPE)
  ||'</a>’
  || ‘ -> ‘
  || LISTAGG(‘<a href=”’
||’f?p=&APP_ID.:5:&SESSION.::&DEBUG.::P5_PARENT_PART_ID,P5_VEHICLE_TYPE,P5_PARENT_PART:’
  || VEHICLE_PART_ID
  ||’,’
  ||CATEGORY_ID
  ||’,’
  ||VEHICLE_PART_NAME
  ||””
  ||’>’
  || VEHICLE_PART_NAME
  ||'</a>’,’ -> ‘) WITHIN GROUP (
ORDER BY
PARENT_PART_ID)
FROM
AP_SY_VM_VHL_PRTS vp
START WITH
VEHICLE_PART_ID      = :P5_PARENT_PART_ID
  CONNECT BY PRIOR PARENT_PART_ID =
VEHICLE_PART_ID
ORDER BY LEVEL
DESC
Step 4:

In the item, under
Security select Escape Special Characters option as No.

By 
A.Arun Kumar
  • December 29, 2016 | 17 views
  • Comments