Wednesday, 18 September 2013

Auto refresh Peoplesoft page after regular interval/Javascript

I love JavaScript as it is FAST and reduces load from the server.
lots of stuff that javascript does can be done very easily  by peoplecode.

Like if one wants to show an alert message using javascript.

For that One can simply use the messagebox function in peoplecode.

For checking the length of the field, one can write an logic on the field change and check the length using the field class.
But for that you may need to make the page or field interactive, that means the page will go to server after each interaction and thus again increasing the load on the server.
Therefore I prefer Javascript.

Now coming to the  Auto refresh of peoplesoft page.
There is a delivered button that one can use (Refresh )

Or second method will be:

getlevel0().refresh();  this will refresh the page and bring new data in the component buffer.

But our requirement is that the page should refresh itself without user intervention.

For that I used a simple combination of 2 functions in javascript.

One need to place a HTML on peoplesoft page, now you can have it as constant or as the field in derived work record.

For field in derived work record  you will have to create an HTML definition, Place the script in the definition and provide the value with getHTMLtext function.You can choose the event on which you
want to fire the code/script.

For auto reload a page:
Place a HTML tag in the page:

Here I have created no function as i want to fire the script as soon as it loads.
Using the function:setintervel we tell the code the time diff to fire the reload process.

With this code in place the page will refresh itself after the time interval defined.

This can useful if somebody wants to monitor real time numbers coming on real time basis. 




Tuesday, 17 September 2013

XSLT mapper with Application designer.

I was trying to include Jdeveloper for XSLT mapping in application designer,but was not able to do so with the documents provided by peoplebooks.


So here is series of step I following to make to it work:

1) Install JDeveloper
- I installed 11.1.1.5.0 to C:\Oracle\Middleware
2) Install SOA extensions
- JDeveloper > Help > Check for Updates
- Follow Wizard, select to manually locate file, navigate to the soa-jdev-extension.zip file and install
3) Copy JDK into JDeveloper Home
- JDeveloper 11.1.1.5.0 installs jdk160_24
- Copy C:\Oracle\Middleware\jdk160_24 to C:\Oracle\Middleware\jdeveloper\
- Rename C:\Oracle\Middleware\jdeveloper\jdk160_24 to C:\Oracle\Middleware\jdeveloper\jdk , else JDeveloper won't find the JDK.
4) Configure PS client
- Run PSCFG.exe
- On the "Crystal ... /JDeveloper" tab:
  - Enter JDeveloper HOME path C:\Oracle\Middleware\jdeveloper
  - Enter "Launch Mapper Classpath" (ensure there are no linefeeds in path else it won' work, all jar files outside JDeveloper HOME need absolute paths, jar files in the JDeveloper HOME use relative paths to the JDeveloper HOME)
    jdev\extensions\oracle.bpm.mapper.jar;integration\lib\bpm-ide-common.jar;ide\lib\javatools.jar;jdev\lib\xmleditor.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xmlef_11.1.1\xmlef.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javatools_11.1.1\javatools-nodeps.jar;