HIUG Interact 20132013-06-07T16:00:00.002-07:00
HIUG starts on Sunday. Great weather, beautiful setting... expect an excellent conference! I hope you will be ready to start the conference early on Sunday :). At 2 PM, Brent Mohl and I will deliver a Hands on workshop which gives attendees an opportunity to build content with new PeopleTools 8.53 User Experience tools. Here is a list of sessions I and my colleagues are involved with:
I'm looking forward to hearing Cincinnati Children’s Hospital Medical Center talk about TDD and PSUnit (Jun 11, 2013 02:15 PM - 03:15 PM in Trailblazer B). Also, be sure to attend the "Have Your PeopleSoft Systems Been Hacked?" session led by Larry Grey Jun 10, 2013 (12:45 PM - 01:45 PM). I attended this one at Alliance. Great session! ... of course, it is offered at the same time as my PeopleTools 8.53 in Action session :(
jQuery in PeopleTools 8.532013-05-31T20:12:00.000-07:00
A lot of customers are now working with PeopleTools 8.53. If you open Application Designer and search for HTML definitions named PT_JQUERY, you will see there are 2 (sometimes more) new jQuery JavaScript definitions included with PeopleTools 8.53:
PT_JQUERY
You no longer need to download, upload, or otherwise install jQuery to use it with PeopleSoft applications. One interesting thing I noted in the PeopleTools jQuery file is that the end of the jQuery file uses jQuery.noConflict() to replace $ with ptjq162. Unfortunately, it doesn't take advantage of the include protection I described in my post jQuery Plugin Include Protection, so be careful using it in pagelets directly.
jQuery.noConflict()
$
ptjq162
Firebug One-line'r to go from psp to psc2013-05-23T15:23:00.003-07:00
I perform a lot of prototyping in the Firebug console. Since most of this prototyping refers to the TargetContent frame (component area), not the header and main window, I find it easier to change out the URL to just the "psc" core content URL, eliminating the header frame. When navigating from a homepage, this URL change is a matter of just replacing the /psp/ in the browser's URL with /psc/. When navigating from some other transaction, however, it is not so easy. The URL in the browser is for the first component opened with that browser which may or may not be the current component displayed on the screen. Here is a quick one-liner that I use in the Firebug console to remove all of the PeopleSoft "chrome", leaving just the transaction area:
window.location.href = frames["TargetContent"].strCurrUrl.replace("/psp/", "/psc/")
Better yet, drag the "bookmarklet" link onto your bookmarks toolbar to add this one liner to your browser favorites. Then when you want remove the PeopleSoft header (and left menu on older versions of PeopleTools), just click the bookmark/favorite.
Chromeless PS Bookmarklet
AWE Workflow Application Class Criteria2013-04-20T22:29:00.000-07:00
I had a little trouble creating my first App Class criteria so I thought I would share some tips on how to write an App Class for use as AWE criteria. Here are the primary secrets:
EOAW_CRITERIA:DEFINITION:CriteriaBase
PTAF_CRITERIA:DEFINITION:CriteriaBase
%Super
Check(&bindRec_ As Record) Returns boolean
Here is a sample template:
import EOAW_CRITERIA:DEFINITION:CriteriaBase;class MyCriteria extends EOAW_CRITERIA:DEFINITION:CriteriaBase method MyCriteria(&REC_ As Record); method Check(&bindRec_ As Record) Returns boolean;end-class;method MyCriteria /+ &REC_ as Record +/ %Super = create EOAW_CRITERIA:DEFINITION:CriteriaBase(&REC_.EOAWCRTA_ID.Value);end-method;method Check /+ &bindRec_ as Record +/ /+ Returns Boolean +/ /+ Extends/implements EOAW_CRITERIA:DEFINITION:CriteriaBase.Check +/ REM ** TODO evaluate something here; Return True;end-method;
jQuery Plugin Include Protection2013-04-01T13:22:00.000-07:00
I have a few blog posts that show how to use jQuery plugins on PeopleSoft homepages. When designing those pagelets in Pagelet Wizard, it is important that your XSL/HTML include jQuery and any necessary plugins within your pagelet's HTML/XSL. This is how my Slideshow and Accordion Navigation templates work. Including jQuery and required plugins in each pagelet, however, means that a homepage using these pagelets will have multiple instances of jQuery. jQuery is designed to load once, with plugin scripts loaded as needed. Since each pagelet has its own pointer to jQuery, as each pagelet loads, the browser tries to reload jQuery, redefining the jQuery and $ global variables and resetting the collection of previously loaded plugins. The end result is that a homepage with multiple jQuery based pagelets will only have one working pagelet. The rest will have been invalidated by the last pagelet to load jQuery.
jQuery
The jQuery documentation discourages the presence of multiple instances of jQuery within the same page. The theoretical concept is that each page should load jQuery once, and sites should be written to include only one jQuery script tag. The nature of homepages with their independently managed fragments doesn't allow for this. The way I work around this is to wrap the jQuery JavaScript library in something akin to the C-style header #ifndef include guards.
if(!window.jQuery) {/* downloaded, compressed/minified jQuery content goes here */}
I make the same change to jQuery plugins because they often include their own setup and usage data, but, of course, testing for a different variable. Here is my jQuery UI processing protection:
if(!window.jQuery.ui) {/* downloaded, compressed/minified jQuery UI content goes here */}
This minor change to the jQuery JavaScript library and plugin files keeps the browser from re-interpreting these JavaScript libraries. The browser interprets these file once, and then fails the conditional for each subsequent script tag that points to that particular library. This allows plugins to load as needed and all plugin setup and usage data to persist across multiple pagelets.
Of course, the best solution would be to just have each JavaScript file referenced once. Since that isn't practical on a homepage, this solution at least ensures the files are only processed once.
Collaborate 20132013-03-14T18:50:00.000-07:00
It is almost time for Collaborate 2013. For those of you attending, here is my schedule:
I will also be working in the Oracle User Experience demo pod and visiting in the PeopleTools demo pod. I look forward to seeing you there!
Copyright © 2013 McGraw-Hill Global Education Holdings, LLC Any use is subject to the Terms of Use and Privacy Notice