Tuesday, January 8, 2008

How to determine whether a component interface exists for a component ?

Given a component , how do you determine whether a component interface has been created ? While there may be other methods to query the component interface.
The answer is simple.

Simply query the peopletools table.
PSBCDEFN The field BCPNAME contains the component name.

Monday, January 7, 2008

DoModal

Do Modal:



Used to transfer user from existing page to a modal page. User cannot come back to the calling page until, the modal page is dismissed by selecting the ok or cancel button.



The function returns a integer representing the button clicked by the user ( 1 = ok and 0 = cancel )



The calling page can access the records of the modal page. But the modal page cannot access the records of the calling page. To overcome this limiation, you can create component/global variable assign values to it before calling the modal page.

Friday, January 4, 2008

%SelectInit

The Meta SQL %SelectInit ia used in App engine programs to assign values to the state record. But there is a slight difference when rows are not retrieved by the select statement.

While %Select will retain the existin value is no rows are returned, %SelectInit intialized those state record fields to defaults if the select statement does not return any rows.

HTML Area

HTML Area is a page control which is populates with static html code or dynamic html code.

If static, the html code is assigned to the property at design time.
If dynamic, the page is associated with a record (drived /work record ) and a field. The field is populated with the html text. Generally, the html text is stored as an html object and retrived and displayed.

Style Sheets

Stylesheet is a definition like any other object definition. It consists of
classes with attributes that control the appearance/formatting of objects it is applied.

You define a style sheet in Application designer.

Each class is a collection of the above properties. The attributes include font size, color, border width etc.

To make common classes reusable, peoplesoft supports creating of substyles which can be added to multiple stylesheet definitions thus making it reusable.

Each page control defaults a specific class. If that page control's syle drop down list shows use default style, that page control will be applied the default class's attributes.
This can be changed to a custom class that you create provided it is associated with a style sheet linked to the page the page control sits on.

A page can be associated with just one syle sheet. To change the default style sheet for a page, access the page objetc's properties. In the use table change the style sheet.

Thus the following hierarchy emerges
Style Sheet associated with a page.
--> Classes
-> Sub style sheets
--> classes

The class can be associated with the page control and/or the label. ( depends on the type of page control.

This association can be at design time or changed dynamically at run time using peoplecode.

To dynamically associate a class to a page control, assign the class to the Style property of the page control. The class is assigned as a string object in double quotes.

Be carful to avoid makinf spelling mistakes.

Peoplesoft delivers a default stylesheet PSSTYLEDEF which is in turn associated with a number os sub styles.

To use your own style sheet change the Style sheet edit box value in
People Tools > Administration > People Tools Options to your style sheet.
A style sheet has the following properties

  1. Type: Standard or sub style sheet.
  2. Parent Style sheet: Defalt is the one specified in the People Tools Option page.

You will have to play with the various attributes to see the impact of changins specific attribute s on classes associated with pae control.

Thursday, January 3, 2008

Avoiding the Data has changed warning

Often time, you might create pages with scrolls/grids that you populate thru people code.
for e.g. you invoke the insert row function and then set the values of various fields.
If this is done in the component pre and post build events, then these rows are not flagged as new/changed.
However, if these rowsets are populated after the page is dsiplayed( for e.g. whne the user clicks a button ), the rows are flagged as new and changed. Consequently, when the user moves away from the page, the data has changed warning will be issued.

To avoid that(assuming that you do not want to display that warning message) you can set the property on the component. In the Use tab of the components properties, uncheck the Disable Saving Page. This will do the trick.

I bet there might be other options.

To hide the add /delete icons in the Grid

Ever wondered how one can hide the add and the delete buttons in a grid.

It is not enough that you unselect no row insert and no row delete property in the Use tab of the grid. A user can still delete/insert a row from the grid by clicking the + or the - button that gets added.

To hide this button, go to the properties of the grid, go to Label tab click the properties button in the Body area and click the invisible check box.

Overiding the default flagging of records as new/modified

Generally, changes made to a row including a row insert ( even thru peoplecode ) caused the row to be flagged as changed or new as the case maybe.

The only exception is changed mage to a field in the Field Default and Field Formula.


This behaviour can be overriden in the following circumstances:

1. When a row is inserted, you can prevent that row from being flagged as new.
2. Changed made in the rowinit: Component processor can be instructed to not flag that as a change.

This is accomplished by setting the ChangeOnInit property of Rowset class to false.