Page Activate vs. Component PostBuild


From time to time I have used Page Activate Peoplecode for page specific processing especially where page data/options would’ve needed to be reset or re-evaluated every time the page was loaded.

A while back I came across an article on Cedarhillsgroup website where Chris Malek suggested against using Page Activate PeopleCode. (Stop Using Page Activate Peoplecode)

While I still would use Page Activate PeopleCode,  one of the good points he makes is the fact that Page Activate Peoplecode doesn’t activate when the component is invoked through a Component Interface.  He suggests using Component PostBuild instead of Page Activate where it is applicable.

So stay away from Page Activate if you don’t have to use it, especially if you will be using the component in a CI.



View PeopleCode Styles

I have always had trouble finding the right style for an edit box, label, header etc. in Peoplesoft. Everything was trial and error where I would pick a style , save the page and then see how it looked online.

This was very inefficient and time consuming so I was looking for a better way where I can see all the styles at once and pick the one I like.  I came across Doug Stupple’s post on this topic which is exactly what I was looking for.

Here is the idea:

  • Create a while loop and fetch styles from PSSTYLECLASS
  • Enclose returned style name in html DIV tags and add them to a string variable
 &StyleHTML = &StyleHTML | "
<div class=" | &StyleName | "> " | &StyleName | "</div>
  • Create a HTML area on a page and reference a long descr field on a work record
  • set the value of descr long to the string variable above

Here is the result: