On one of the pages there was a need to refresh a report region when a node in an APEX Tree was clicked. As far as I know there is no built-in method to create a Dynamic Action to a node in an APEX Tree, so this might call for a Custom Event.
If there is a built-in method, please leave a comment :)
Trigger Custom Event
To trigger a Custom Event, change the "link" column in the APEX Tree Query to something like the following:
The "value_from_table" will be available in the Custom Event as the Data object.
Handling the Custom Event
To handle the Custom Event, follow the "Create Dynamic Action" wizard and fill in the following:
- Event: Custom
- Custom Event: nodeClicked
- Selection Type: Dom Object
- Dom Object: document
In my case I needed the "value_from_table" and use "Set Value" as a TRUE action, and refresh a report.