PeopleSoft has been increasingly adding new ways to modify it's software without intrusive customization. One was is Event Mapping. This allows code to be placed in a application package and change the behavior of pages. These "maps" are tied to components.
Here's a simple example.
1. Create a custom Application Package
From Application Designer. Go to File -> New -> Application Package
Save it and give it a name
Right click on the package and select Insert App Class
Give the class a name
Double click to enter PeopleCode Editor
Create a class the extends PT_RCF:ServiceInterface
An application class for event mapping must import and extend the PT_RCF:ServiceInterface class. In addition, it must define a single method named execute.
In this example the class is named make_links_clickable
import PT_RCF:*;
class make_links_clickable extends PT_RCF:ServiceInterface
method execute();
end-class;
Now create the method
method execute
/+ Extends/implements PT_RCF:ServiceInterface.execute +/
end-method;
Code the method to make link editable.
method execute
/+ Extends/implements PT_RCF:ServiceInterface.execute +/
VNDR_MAINT_WRK.DCP_URL_PB.Enabled = True;
end-method;
Notice that we are accessing the component buffer here in the application package. We can do this because we'll be assigning this package to the component.
Step 2: Create a Related Content Service
From PeopleSoft
PeopleTools -> Portal -> Related Content Service -> Define Related Content Service
Click Add a New Value and give it a name
Select the Application Package and Class Created
Step 3: Map Related Content Service to Component Event
PeopleTools -> Portal -> Related Content Service -> Manage Related Content Service
Select Event Mapping (Tab) Click on 'Map the event of the Application pages' hyperlink
Navigate to the component where this code should execute.
Chose the event that will execute the code.







Comments
Post a Comment