Showing posts with label PeopleSoft Portal. Show all posts
Showing posts with label PeopleSoft Portal. Show all posts

Friday, November 6, 2015

Data Mover Import Export

A common development task is to move data between two different PeopleSoft environments.  You can use App Designer to move code, table structures, and pages, but data is a different story.  Data Mover is your tool for moving your data.
My biggest challenge is that I don’t use it enough to have the syntax memorized.  This post is a list of common tasks with the syntax to make it easier to remember…

Copying Data Out

The export command copies data out of the database into a DAT file.  You should set the Log parameter to save the log to a particular place.
SET LOG C:\Temp\export.log;
SET OUTPUT C:\Temp\data.dat;

EXPORT PS_BAS_EVT_CLASS;

You can use the record name or the table name.  So, here’s the same thing with the record name instead of the table name.
EXPORT BAS_EVT_CLASS;
If you want to restrict which rows from the table get written into the data file, you can add a where clause:
EXPORT BAS_EVT_CLASS
WHERE EVENT_CLASS = 'CVG';

Copying Data In

The import command is the way to copy the data back into the system.  You will want to set the Log parameter and you have to set the Input parameter.
SET LOG C:\Temp\import.log;
SET INPUT C:\Temp\data.dat;

IMPORT BAS_EVT_CLASS;

If you want to limit which rows you want to import, you can use a Where clause.  For me, it wouldn’t work unless I used the parameter (:1).
IMPORT BAS_EVT_CLASS WHERE EVENT_CLASS = :1;CHAR,CVG;

Now, if the row already exists, it will ignore it.  There is a “Set Ignore_Dups” option, but I didn’t have to use it.  It just ignored the row that already existed.  To get it to update the row, I used the “Set Update_Update” option:
SET UPDATE_DUPS;
IMPORT BAS_EVT_CLASS WHERE EVENT_CLASS = :1;CHAR,CVG;

These commands so far work with only the rows that are in the data file.  If the database has extra rows that you don’t want, you need to use Replace_Data.  You could truncate the table first, but the Replace_Data command is designed for just this:
REPLACE_DATA BAS_EVT_CLASS;

Friday, August 7, 2015

PeopleSoft and Load Balancers on WebLogic


ISSUE:
End users are intermittently seeing "This page is no longer available" message or intermittently kicked out to the search page. These problems occur since the end user's sessions are not sticky and end user's session are bouncing between multiple webservers. Incorrect load balancer setup may cause other intermittent problems.

SOLUTION:
Verify PIA and load balancer are setup correctly with the following checklist:

1. For customers that use a load balancer, Oracle recommends using a cookie (session) based load balancer and sticky bits enabled.  IP based load balancing is not recommended and IP based load balancing is known to cause session stickiness problems.  
For more information on cookie based load balancing and sticky bits, please follow up with your load balancer vendor.
F5: http://www.f5.com/pdf/deployment-guides/f5-peoplesoft-dg.pdf

2. Ensure all your webservers have the same cookie name in each weblogic.xml file.  This file can be found in the following directory: 
/webserv//applications/peoplesoft/PORTAL/WEB-INF/weblogic.xml
In this example, there's two webservers behind the load balancer. Therefore, verify that your cookie names are the same:

weblogic.xml (webserver 1):


CookieNamepststweb-7011-PORTAL-PSJSESSIONID 

weblogic.xml (webserver 2):


CookieNamepststweb-7011-PORTAL-PSJSESSIONID 

Save both weblogic.xml files.

** If you're running Enterprise Portal and have content providers, please ensure that all Enterprise Portal webserver cookie name are all exactly the same. The content provider's webserver cookie names should have their own set of cookie names. Therefore, both Portal and content should not have the exact same cookie name. Suppose Enterprise Portal had 4 webservers and HR had 4 webservers. All 4 Enterprise Portal cookie names could be eportal-7011-PORTAL-PSJSESSIONID, but all 4 HR cookie names could be hrms-7011-PORTAL-PSJSESSIONID.

3. In weblogic.xml, ensure CookieDomain is set in all weblogic.xml. This value is automatically set when entering the authentication domain during the PIA install. If the authentication domain isn't set during PIA install, please reinstall PIA and set authentication domain.


CookieDomain .company.com
4. In PIA, navigate to "PeopleTools -> Web Profile -> Web Profile Configurations". Search for your Web Profile. Click on

Virtual Address and populate your default addressing. For example, suppose your end users access your load balancer with the following URL:@ http://mycompany.com/ps/signon.html You would need to set the following:

Default addressing Protocol: HTTP
Default addressing Name: mycompany.com
Default addressing Port: 80

* The above is an example. You'll need to populate with your load balancer info.
5. Please ensure PIA "Inactivity Logout" in seconds matches HTTP timeout in minutes.

a) In PIA, navigate to "PeopleTools -> Web Profile -> Web Profile Configurations". Search for webprofile. Click on "Security" tab. PIA timeout is "Inactivity Logout" in seconds. Suppose "Inactivity Logout" = 1200 seconds.

b) In WebLogic, open web.xml file.  This file can be found in the following directory:
/webserv//applications/peoplesoft/PORTAL/WEB-INF/web.xml 
WebLogic HTTP timeout appears in minutes:

20

In this example, ensure WebLogic HTTP timeout is 20 minutes to match "Inactivity Logout" (1200 seconds).

The Load Balancer's timeout should be higher than the PIA "Inactivity Logout" timeout and webserver HTTP timeout. Please consult with load balancer vendor to find out where to set load balancer timeout.

6. After updating weblogic.xml, web.xml and webprofile, you must bounce your webservers.

KEYWORDS: SPOTLIGHT, "page is no longer available", Load Balancer

Monday, February 16, 2015

Pagelet Wizard Custom Tags

Pagelet Wizard custom transformations can use special tags documented here to insert images, message catalog entries, or to format numbers and dates. This is great when trying to format currencies or ensure multilingual compliance. The problem with "Post-Transformation Processing," as it is called in PeopleBooks, is that it requires the transformation results to be valid XML. Question: How do you get Pagelet Wizard to generate valid XML when the Xalan processor used by PeopleTools sees HTML tags and automatically generates HTML? Answer: use the <xsl:output> XSL tag. Here is a sample template that produces valid XML:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    exclude-result-prefixes="xhtml xsl">

    <xsl:output method="xml" version="1.0" encoding="UTF-8"
        doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
        indent="yes" />

    <xsl:template match="/">
        <!-- your XSL goes here -->
    </xsl:template>
    
  <!-- identity transform templates -->
  <xsl:template match="*">
    <xsl:apply-templates/>
  </xsl:template>

  <!-- delete unmatched text -->
  <xsl:template match="@*|text()|comment()|processing-instruction()">
  </xsl:template>
  
</xsl:stylesheet>

Iscripts Example



Iscripts by Example:
Create a derived work record which starts with WEBLIB_XXXXXXXX
Include a field ISCRIPT1 which holds the peoplecode function for Iscript as show below.
Record Definition: WEBLIB_HELOWRLD

The below script , echoes the value entered in the text box.
Function IScript_HelloWorld()
Below is the code placed in fieldformula



Security:
After you create a WEBLIB record, and your functions, you must add them just as you would add a page to an application.

Adding the WEBLIB record to permission list PTPT1000. Below is the snapshot.



Click on Edit to control the type of access to the functions.
Testing: Login to PIA and copy the below URL.

http://localhost:8000/psp/hr9stg/EMPLOYEE/HRMS/s/WEBLIB_HELOWRLD.ISCRIPT1.FieldFormula.IScript_HelloWorld

Note: You need to replace 8000 with webserver port and hr9stg with the domain name.
The below script , echoes the value entered in the text box.
 
This completes the creation and testing of iscript.
Note:  You might have observed that just like the content reference which has a URL , the iscript is also a URL.
So, just like the way we register component through App designer to make the link available to the user in PIA, similar way we can register for iscript as well.
Will discuss in detail on the registring iscript in another post. Below arrow shows the registration wizard for Iscript in App Designer.

Wednesday, May 28, 2014

Determine Hidden Folders and Content References for Portal Navigation

If you do not see a folder or content Reference (Menu Item) in Left hand side navigation, (Applicable to 8.4x ) then you must check to see if the folder or content reference is not marked as hidden. Other reasons could be security. Here is a SQL to find out all the objects that are hidden.

To find all the folders which are hidden from Portal Navigation.

select * from PSPRSMSYSATTRVL where portal_name = 'EMPLOYEE' and PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV' and portal_Reftype = 'F'
select a.portal_objname,b.portal_label,b.portal_prntobjname,c.portal_label
from PSPRSMSYSATTRVL a,psprsmdefn b,psprsmdefn c where a.portal_name = 'EMPLOYEE' 
and a.PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV' 
and b.portal_Reftype = 'F' and a.portal_name = b.portal_name 
and a.portal_objname = b.portal_objname
and b.portal_name = c.portal_name
and b.portal_prntobjname = c.portal_objname

To find all the content references which are hidden from Portal Navigation.

select * from PSPRSMSYSATTRVL where portal_name = 'EMPLOYEE' and PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV' and portal_Reftype = 'C'
select a.portal_objname,b.portal_label,b.portal_prntobjname,c.portal_label
from PSPRSMSYSATTRVL a,psprsmdefn b,psprsmdefn c where a.portal_name = 'EMPLOYEE' 
and a.PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV' 
and b.portal_Reftype = 'C' and a.portal_name = b.portal_name 
and a.portal_objname = b.portal_objname
and b.portal_name = c.portal_name
and b.portal_prntobjname = c.portal_objname

Replace EMPLOYEE with Your portal name. Some of the Other names are.
CUSTOMER
DEMOSITE
EMPLOYEE
MOBILE
PORTAL
PS_SITETEMPLATE
SUPPLIER
Portal Content Reference/folder Attributes are stored in
PSPRSMSYSATTR
PSPRSMSYSATTRVL

Thursday, May 22, 2014

Building a Search Index and Searching the Portal - VERITY Search Engine

What does Verity Search engine do?
How to build a Search Index?
What PORTAL_INDEX application engine program does?
How to retrieve content references path by searching the portal?
This post is an attempt to answer these questions.

Verity Search Engine:
PeopleSoft Portal technology provides a tremendous search feature using the Verity search engine. PeopleSoft Portal and Verity Search technologies combine and give portal users easy and efficient search on content references registered in the portal registry.

Registry Search Index:
The portal registry collections are generated by the portal administrator and stored on the application server. This can be either done manually or by a scheduled process. The application engine used to build the registry search index is PORTAL_INDEX. 

This process can be run manually from the navigation:
PeopleTools -> Portal -> Build Registry Search Index

Verity Collection files are stored on the application server in the location:
%PS_HOME%\data\search\< index_name >\< db_name >\ < lang_cd >

  • %PS_HOME% - the home directory in which PeopleSoft application server is installed
  • < index_name > - name of the application or the portal name for portal registry that the collection is serving (PORTAL)
  • < db_name > - as the name signifies name of the database
  • < lang_cd > - PeopleSoft local language code. A single portal will have only one collection per locale. Each holds the text files used to build the collection - input.bif and input.dat
Several numbers of subdirectories exist beneath the language code directory. These hold the various elements of actual collection used by Verity to conduct the search.

Running the PORTAL_INDEX application engine process builds a search collection which includes few elements from the content references in the registry and get included in the index.

We know that Content References can be accessed from 
PeopleTools -> Portal -> Structure & Content -> <(nested) folder_name> -> ContentReference 
  
PeopleSoft Component Content References have the following information: 

  • ICType
  • Menu
  • Market
  • PanelGroupName
iScript Component Content References have the following information: 

  • ICType
The following information is collected for all Content References: 

  • Label
  • Description
  • Author
  • Product
  • Valid from Date
  • Valid to Date
  • Creation Date
  • Content Provider
  • URL
  • Path
  • Attributes
In the Content Reference Attributes, a set of keywords are entered for PeopleSoft delivered content references. These keywords are specified in Attribute Value and not in Name or Label. To add keywords to a content reference the NAME for the content reference attribute must be KEYWORD and add the search words or phrases separated by commas. 
  
To have the Label and Attribute values to be a translate table click the Translate checkbox. Two distinct tables are used for attributes. One is translatable into other languages while the other is not. For example, PORTAL_HIDE_FROM_NAV = False is used internally by the system and should not be translated however keywords should be translated. 
  
For accurate and high performance searches through the portal, the search engine must reference a comprehensive, up-to-date search index. The search index must be easy to maintain, as content is likely to change frequently within the portal registry.  
  
How the Search Index is built? 

  1. The Application Engine (AE) program - PORTAL_INDEX has to be launched through the process scheduler.
  2. This AE process launches a PeopleSoft C++ program. The C++ program queries the tables in the 'Portal Registry' for search content and it builds two text files. These files are created as .BIF and .DAT which are used by Verity to build its collection.
  3. The AE process then launches the Verity program - MKVDK. The MKVDK program builds the Search index (Verity collection) based on the content in .BIF and .DAT files
Running the PORTAL_INDEX process:
In a busy portal where the content gets frequently changed it is absolutely important to refresh the search index often. Every time the search index is built, the existing search index is overridden. So, generally it is better to schedule this process in batch environment. Alternatively, the process can be also run manually. 
Go to: PeopleTools -> Portal -> Build Registry Search Index
After creating or reusing an existing Run Control ID, Run the process. Before running the process, under Language Options, check the 'All Installed Languages' check box as required.

Searching the Portal after building Search Index:
Type any valid keyword in Search and click 'Go'. The search performs the following steps:

  1. The case of the entered text gets changed to uppercase automatically. This string enables the Verity search engine to search for the text irrespective of case type.
  2. The query string is formatted and passed to the Search API. The formatting includes filtering out hidden content references, expired content references and invalid content references based upon from and to dates.
  3. Calls the Search API which returns the query results
  4. Calls the Portal Registry API. This is done to apply security filtering to the results. Security is applied in PeopleCode by checking the 'Authorized' property.
  5. Formats and displays the search results.
For every content reference returned by the search results page, the following fields are displayed:

  1. Content reference label - a hyperlink which on a click  takes directly to the content reference URL
  2. Long Description of the content reference
  3. Path - breadcrumbs to the content reference

Adding Custom CREF Images to Folders

Have you ever noticed that some links have a custom image in the navigation like this?

It is very easy to reference an existing image in the PeopleTools database.
In Structure and Content, navigate to the desired CREF.
Add a PTPP_IMAGE “Content Reference Attribute” to the CREF and enter the image object name in the value field.

Find Missing Portal Pagelets on a user’s home page

There are times when a user’s PeopleSoft Portal home page customization can get mixed up and pagelets go missing. For Example, if the user chose a two column layout but the tables that store the user’s homepage configuration have a pagelet set to display on the third column those pagelets will never be shown.

Here is query that will find those missing missing pagelets.
SELECT * FROM
   PSPRUHTABPGLT A,
   PSPRUHTAB B, 
   PSOPRDEFN C
WHERE A.PORTAL_NAME = B.PORTAL_NAME
AND A.OPRID = B.OPRID
AND A.PORTAL_COL_NUM > B.PORTAL_COLLAYOUT
AND A.OPRID = C.OPRID 
AND ACCTLOCK = 0
 
To correct this you can get the user to switch to a 3 column layout, then flip them back to a 2 column layout. This will fix the invalid entries in portal tables.

Migrate PeopleSoft Enterprise Portal Managed Content Data with DMS

Here is a DMS script that will export Enterprise Portal Managed Content data where you can import into another database.
The user interface for this is: Content Management > Managed Content > Browse Folders
I have tested this migrating data between Release 9 to Release 9.1. There did not seem to be any structure changes between those releases for these tables. I am sure someone will find this useful.
set log C:\TEMP\content_export.log;
set OUTPUT C:\TEMP\e9_cm_export.dat;

EXPORT EPPCM_CONTENT;
EXPORT EPPCM_CATG_MEM;
EXPORT EPPCM_CATG_CONT;
EXPORT EPPCM_DOC;
EXPORT EPPCM_HTMLTEXT;
EXPORT EPPCM_DOCINDB;

EXPORT EPICP_WF_CNTAPR;
EXPORT EPICP_TMPL_HDR;
EXPORT EPICP_TMPL_DETL;
EXPORT EPICP_INST_HDR;
EXPORT EPICP_INST_DETL;
EXPORT EPPCM_CATEGORY;

Tuesday, May 13, 2014

PeopleSoft Branding

Here's one way to change your PeopleSoft Portal Header from this

to something like this

Preface
I was grateful I discovered @peoplesoftwiki's great post about PeopleSoft Branding. It meant that this post wouldn't have to be quite as long. Because as it turned out I followed the same steps as @peoplesoftwiki (extending Application Package PT_BRANDING and overriding the Branding Package on PeopleTools Options page.) I went one or 2 steps further it seems so I'd like to expand on that.

Before I begin, I need to tell you the main assumption I made. We are moving to PeopleTools 8.50 and we have decided to use the new Swan style. This is important as there is code in PT_BRANDING methods that is wrapped in if statements checking whether the style = "swan". That meant I only had to focus on making changes to items where this was true.

And one more thing before going any further: configuration good, customisation bad. (Though I don't always follow that mantra.)

Application Package
So just like @peoplesoftwiki, I extended PT_BRANDING. I made a few changes, including:
  1. adding new methods to get data out of the system that I wanted to display in the Portal Header
    • setGreeting, to prefix the Users greeting as set in Personalize Content with the description of the Environment as set in PeopleTools Options
    • getOxfamLinks, to read and labels and links from the message catalog (labels being the message, and the links being the explanation text) to be displayed along the top of our branded portal.
  2. replacing calls to the delivered HTML Definitions that formed the basis of the Portal Header. Those 3 methods and the HTML defintions are
    • getIframeHeaderHTML - PT_IFRAME_HDR_SWAN
    • GetExpPasswordHdrHTML - PORTAL_EXP_PASSWORD_HDR
    • GetUniHeaderHTML - PORTAL_UNI_HEADER_NNS_SWAN
The changes made to the methods getIframeHeaderHTML, GetExpPasswordHdrHTML and GetPortalUniHeaderNNS were all very similar, so I'll just go in to details for the method getIframeHeaderHTML. I basically left the code all the same, except for adding calls to my new methods setGreeting and getOxfamLinks and another call to get some more text from the message catalog and a call to the GetPortalHomepageURL() function to retrieve the Homepage URL.

HTML Definition
To make use of all this, I would either need to change the delievered HTML definition or create my own. So I created my own by opening the delivered PT_IFRAME_HDR_SWAN and doing a Save As to create OXF_IFRAME_HDR_SWAN. By doing this I had complete control over the HTML I wanted displayed. The main change I made was to the pthdr2container <div>, changing it from

<div id="pthdr2container">
<div id="pthdr2logoswan"> </div>
<div id="pthdr2greeting">
<span class="greeting">%bind(:15)</span>
</div>
%bind(:16)
<ul id="pthdr2links">
%bind(:17)
</ul>
</div>
 
 
to

<div id="pthdr2container">
<div class="oxfblend">
<div id="pthdr2logoswan"
 onclick="javascript:window.location='%bind(:27)';return false;">
</div>
<div id="pthdr2greeting">
<span class="oxfps">%bind(:26)</span>
<span class="oxfgreeting">%bind(:15)</span>
</div>
<ul id="oxfhdrlinks">
%bind(:25)
</ul>
<ul id="pthdr2links">
<span>%bind(:17) </span>
</ul>
</div>
<div id="oxfheaderLine3">
<div class="clearer"></div><!--Important - ensures floats
are contained-->
</div>
</div>
The main changes were adding new <div> oxfblend, oxfheaderLine3 and clearer, new <span> oxfps and oxfgreeting and new <ul> oxfhdrlinks. I also removed %bind(:16), the search box, which we didn't think made any sense to have in the Portal Header.

Stylesheets
To make all these new elements on the page look any good, I had to update the Stylesheet. PSHDR2_SWAN held all the styles to control the Portal Header. For example, it defined the style pthdr2logoswan which has the background image as the Oracle Logo. Well we wanted to use the Oxfam Logo so I made a copy of PSHDR2_SWAN to create OXF_HDR2_SWAN and I made my changes to that.

Remember, configuration good, customisation bad. So I copied PSSTYLEDEF_SWAN to create OXF_STYLEDEF_SWAN. And in OXF_STYLEDEF_SWAN, I replaced PSHDR2_SWAN with OXF_HDR2_SWAN. When you switch to the new swan style, you update Default Stylesheet on PeopleTools Options to PSSTYLEDEF_SWAN. I instead switched it to OXF_STYLEDEF_SWAN.

Images
I had to create 4 image definitions in App Designer. Each of these are referenced in the stylesheet OXF_HDR2_SWAN as background images for 4 different elements.


Bringing it all Together
So here's how it all works together. The PT_BRANDING extended Application Package (with new methods) calls the new HTML Definitions. Updated or newly created bind parameters are passed to the custom HTML Definition to generate the content of the Portal Header. The new stylesheets and images provide the formatting for the Portal Header HTML. What you can come up with is only limited by your imagination.

Link To Portal Folder

The code below can be used for a link to navigate to your portal folder.

Declare Function NavPageURL PeopleCode EOPP_SCRTN_WRK.FUNCLIB FieldFormula;

&LINKURL = NavPageURL(%Portal, %Node, "your-folder-object-name", "PSC", "", "", "False", "", "", "");
%Response.RedirectURL(&LINKURL);

Wednesday, April 30, 2014

Using HTML Areas

This section provides an overview of HTML area controls and discusses how to:
  • Insert HTML areas.
  • Populate HTML areas.
  • Change HTML area labels.
  • Include HTML areas in the page tab order.

Understanding HTML Area Controls

You can insert an HTML area control on any PeopleSoft page. You can insert it at any level on a page, and you can place it in a grid control. This control is rectangular and is easy to resize.
Populate the HTML area control in one of these ways:
  • Statically, in the page field property sheet.
  • Dynamically, by associating the control with a record field or HTML definition.
If the control is linked to a record field, the value of the record field appears in the HTML area. Use PeopleCode to associate the HTML area control with a predefined HTML definition.
When using HTML areas, consider:
  • HTML areas are downloaded to Microsoft Excel as a nonbreaking space (&nbsp).
  • HTML areas are not searched with the Find feature.

Generating Trees in HTML Areas

You can use the GenerateTree PeopleCode function with HTML areas. This example shows the tree that is created by the GenerateTree PeopleCode function on the Select New Parent Folder page:
Image: Example of a tree in an HTML area
This example illustrates the fields and controls on the Example of a tree in an HTML area. You can find definitions for the fields and controls later on this page.
Example of a tree in an HTML area

Populating HTML Areas

You can populate an HTML area either statically, using the HTML Area Properties dialog box, or dynamically, by associating the control with a record field. Because the HTML that you write is included in the HTML that is dynamically generated by the system at runtime, consider the following:
  • The HTML that you include can affect the page layout.
    Complying with the design-time sizing of the HTML area is the best way to ensure that you do not affect the layout of the other page field controls. Adding an invisible frame around the HTML area control can help ensure that you do not affect other page fields.
  • You can use only certain types of HTML tags. These tags are not supported by the HTML area control:
    • <body>
    • <frame>
    • <frameset>
    • <form>
    • <head>
    • <html>
    • <meta>
    • <title>

Using JavaScript in HTML Areas

If an HTML area contains a reference to third-party JavaScript, you need to include the absolutized attribute in the script tag and set it to"false". For example:
<script type="text/javascript" language="javascript" absolutized="false"
   src="../../../../../ps/spellcheck/lf/spch.js">
</script>

Using Rich Text Editor-Generated HTML in an HTML Area

When you use the rich text editor (RTE) to generate HTML that appears in an HTML area page control, you must call the ProcessRTEHTML function to process the RTE-generated HTML before you assign it to the HTML area. The ProcessRTEHTML function wraps the HTML inside a <div> element, sets the style class to PT_RTE_DISPLAYONLY, and attaches the image processing JavaScript. Use the following code as an example:
Declare Function ProcessRTEHTML PeopleCode WEBLIB_PTRTE.ISCRIPT1 FieldFormula;

&HTMLAAREA.value = ProcessRTEHTML ("URL ID of the image target", "HTML Data To be Processed");
Your code might look like this:
&HTMLAAREA.value = ProcessRTEHTML (URL.PT_RTE_IMG_DB_LOC, "<p>example</p>");
The &HTMLAAREA.value should be similar to this:
<div id="RTEDiv188" class="PT_RTE_DISPLAYONLY">
  <p>example</p>
     <script type="text/javascript" language="JavaScript">
          PTRTE_CheckImages("", "PT_RTE_IMG_DB_LOC", "RTEDiv188");
     </script>
</div>

Using HTML Areas in AJAX Mode

Note the following code restrictions in HTML areas when running the application in AJAX mode:
  • Do not include XML tags, such as CDATA.
  • Do not include empty or commented out <script> elements.
  • Do not include document.write as part of the HTML in an HTML area.

Inserting HTML Areas

To insert an HTML area on a page:
  1. Select select Insert, then select HTML Area.
  2. Draw the HTML area on your page.
  3. Move the HTML area control by dragging it with the mouse or by pressing the arrow keys.

Populating HTML Areas

This section discusses how to:
  • Populate an HTML area statically.
  • Populate an HTML area dynamically.

Populating an HTML Area Statically

Use the HTML Area Properties dialog box to populate an HTML area:
Image: HTML Area Properties dialog box with constant text
This example illustrates the fields and controls on the HTML Area Properties dialog box with constant text. You can find definitions for the fields and controls later on this page.
HTML Area Properties dialog box with constant text
To populate an HTML area statically:
  1. Access the HTML Area Properties dialog box.
  2. On the HTML tab, select Constant as the value type.
  3. In the long edit box, enter the HTML code that you want to appear in the HTML area.

Populating an HTML Area Dynamically

To populate an HTML area dynamically:
  1. Access the HTML Area Properties dialog box.
  2. On the HTML tab, select Field as the value type.
  3. Specify the record and field to which you want to associate the HTML area control.
    The value of the record field generates the HTML code that is included at runtime in the HTML area.
    Note: When you associate an HTML area control with a field, make sure that the field is long enough to contain the data that you want to pass to it. For example, if you associate an HTML area control with a field that is only 10 characters long, only the first 10 characters of your text will appear. You should use long character fields for record fields that are associated with an HTML area control.

Changing HTML Area Labels

Assign a distinct label to your HTML area to distinguish it from other HTML area controls on the Order tab of the page.
To change an HTML area label:
  1. Access the HTML Area Properties dialog box.
  2. Select the Label tab.
  3. Enter a brief text description of the HTML area.
    This label does not display at runtime; however, it appears on the Order tab of the page definition.

Including HTML Areas in the Page Tab Order

When the PeopleSoft Pure Internet Architecture generates HTML for a page, it creates a tab index, or order, including every control or widget on the page, based on the field order for that page in Application Designer. However, with HTML areas, the system skips any control defined within an HTML area, by default, when building the tab index. In some situations, this may be confusing to an end user, such as in the case when screen readers are used.
To include the controls in an HTML area within the page tabbing order, add the %tabindex metavariable to the HTML, similar to:

<a href=http://espn.go.com/mlb/clubhouses/bos.html tabindex=%tabindex>Red Sox</a></small></td>
<td><small>94</small></td>
 
When %tabindex appears within the HTML in an HTML area, the controls within the HTML area assume the tab order given to the HTML area itself.
This metavariable is documented in more detail in the PeopleCode documentation, see %tabindex.