Thursday, July 25, 2019

Fluid Navigation Collection - Adding Icons to links in Folders

While configuring Navigation Collections we have the option of setting an icon for each link/folder.

For example:



Let us say, that we add override images for all links and folders in the following Nav Collection which contains links, a folder and links within the folder.


Results

Before adding override images (Default icons)


After adding override images (Custom Icons)


Notice how links in the folder do not have any override images/icons? This is because the delivered code only includes the override images on the first level links and folders. Also, as we all know, Fluid Nav Collections only allow (display) one level of folders. That is, we cannot have a folder within a folder as we could with Classic Nav Collections.

How do we add icons to links in a Fluid Nav Collection Folder?

This seems to be a common requirement that I have run into in many forums. For example:
https://community.oracle.com/message/15394690

As mentioned earlier, this is not available by default for Fluid Nav Collection. The only workaround I could find is to add a small snippet of custom code to apply the image overrides for links within the Folders.


Results

After adding custom code


Note

To avoid this customization, I considered using Event Mapping App Package PeopleCode that could potentially be hooked to PT_AGSTARTPAGE_NUI component. But I did not find an easy way to replicate the code after the fact that the delivered code executed. I found that it is much easier to simply add this custom code in the delivered event.

PeopleCode for Reference

Customized App Class: PTGP_GUIDED_PROCESS.DataSources.NavigationCollectionDataSource.OnExecute
Customized Method: populateGuidedProcessObject