Adding OGL PeopleCode for Fluid Components with Search
Fluid components with a search page do not complete the PostBuild step of the component processor until after a search result is selected. As a consequence, the event that would trigger injecting the OGL JavaScript has not yet occurred; the OGL widget is not displayed on the search page. This issue occurs for fluid components that automatically insert the standard PTS_NUI_SEARCH page, components that are configured for configurable search and automatically insert the PTS_CFGSRCH_FL page, or those that contain a custom search page in the component definition.
To remedy this, PeopleCode event mapping can be used to manually configure the component with a SearchInit event that invokes the PT_OGL_HOOK PeopleCode.
Determining the Component’s Search Record
Use the Manage Configurable Search page to determine the component's active search record.
To use the Manage Configurable Search page to determine the active search record:
From the menu in the browser, select PeopleTools, Utilities, Manage Configurable Search.
In the Content Reference field, enter the content reference name of the component.
In this example, onboarding status was entered.
Select the content reference.
In this example, the OnBoarding Status content reference definition in the Fluid Structure Content folder was selected.
Copy the ID for the search record from the Main Options section.
In this example, HR_OBD_INST_SRC was copied.
Important! Since you are merely obtaining the search record ID, do not save any changes on this page.
Adding Event Mapping to the Component
Use PeopleCode event mapping to manually configure the component with a SearchInit event that invokes the PT_OGL_HOOK PeopleCode.
To add event mapping to the component:
From the menu in the browser, select PeopleTools, Portal, Event Mapping, Event Mapping Configuration.
Click the Add Configuration button.
In the Content Reference field, enter the content reference name of the component.
In this example, onboarding status was entered.
Select the content reference. In this example, the second OnBoarding Status content reference definition was selected.
If you are upgrading OGL from a release prior to PeopleTools 8.62 and you previously configured SearchInit event for this component with the PT_OGL_RC service ID, delete that row from the grid before proceeding. Otherwise, skip to step 6.
In the Event Level field, select Record.
Select the Unrestricted Prompt check box.
Important! You must select the unrestricted prompt so that you can find search records that are not defined at level 0 in the component definition.
In the Page or Record or Record Field field, enter and then select the exact name of the search record that you identified previously.
In this example, HR_OBD_INST_SRC was selected.
In the Event Name field, select SearchInit.
In the Service ID/Application Package field, enter PT_OGL_HOOK_RC.
Important! If you are upgrading OGL from a release prior to PeopleTools 8.62, PT_OGL_RC is also available. Do not select the service ID for prior releases.
In the Processing Sequence field, select Post.
Click Save to save the configuration.
In this example, the SearchInit event has been configured with the PT_OGL_HOOK_RC service ID.
The configuration can be tested directly from this page by clicking the Content Reference link. Otherwise, navigate to the page in the normal manner via a tile or the menu.