If you have worked with Gantt Chart, you may have noticed that it does not support "Link" feature where as other chart types support it. This is because Gantt chart is based on ojGantt API which does not support link feature, where as other chart types uses ojChart API and ojChart does support "Link" feature. Luckily, Gantt charts supports "selection" feature and we can use this feature to implement (mimic) link feature.
To demonstrate this, let's considered a simple use case "Whenever user clicks on task bar, then we need to take user to 'Edit Task' page".
Next, create a hidden page item to store value of TASK_ID. Ensure "Value Protected" option is switched off for this item. In this e.g. item name used is P28_TASK_ID.
Next, we need to capture the click event and we need to mimic the link behavior. For this create a Dynamic Action like below.
|D.A. "Handle Gantt Chart Link"|
- Create DA and give it a proper name e.g. "Handle Gantt Chart Link"
- In "When" Section, select
- Event: Custom
- Custom Event: ojoptionchange
- Selection Type: Region
- Region: Gantt Chart Region
- If the target page needs checksum, and if we use "Submit + Branch" approach, then APEX will take care of checksum automatically. We can't use "Redirect" approach with out valid checksum value. In this example, I have set "Page Access Protection" to "Arguments Must Have Checksum" for "Edit Task" page. We can see this in demo.