Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
People Code Events

People Code Events

Ratings: (0)|Views: 207|Likes:
Published by shery10

More info:

Categories:Topics, Art & Design
Published by: shery10 on Aug 17, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/08/2012

pdf

text

original

 
PeopleCode Events
 This section discusses:
Activate event.
FieldChange event.
FieldDefault event.
FieldEdit event.
FieldFormula event.
ItemSelected event.
PostBuild event.
PreBuild event.
PrePopup event.
RowDelete event.
RowInit event.
RowInsert event.
RowSelect event.
SaveEdit event.
SavePostChange event.
SavePreChange event.
SearchInit event.
SearchSave event.
Workflow event.
Note.
 The term
PeopleCode type
is still frequently used, but it does not fit into thePeopleTools object-based, event-driven metaphor. The term
PeopleCode event 
shouldnow be used instead. However, it’s often convenient to qualify a class of PeopleCodeprograms triggered by a specific event with the event name; for example, PeopleCodeprograms associated with the RowInit events are collectively referred to as
RowInit PeopleCode.
Activate Event
 The Activate event is initiated each time that a page is activated, including when a pageis first displayed by a user, or if a user presses Tab between different pages in acomponent. Each page has its own Activate event. The Activate event segregates PeopleCode that is related to a specific page from the restof the application’s PeopleCode. Place PeopleCode related to page display or pageprocessing, such as enabling a field or hiding a scroll area, in this event. Also, you canuse this event for security validation: if an user does not have clearance to view a pagein a component, you would put the code for hiding the page in this event.
Note.
PeopleSoft builds a page grid one row at a time. Because the Grid class applies toa complete grid, you cannot attach PeopleCode that uses the Grid class to events thatoccur before the grid is built; the earliest event you can use is the Activate event. TheActivate event is not associated with a specific row and record at the point of execution.
Dinesh Kumar ©
 
 This means you cannot use functions such as GetRecord, GetRow, and so on, which relyon context, without specifying more context.Activate PeopleCode can only be associated with pages. This event is valid only for pages that are defined as standard or secondary. This event isnot supported for subpages.
FieldChange Event
Use FieldChange PeopleCode to recalculate page field values, change the appearance of page controls, or perform other processing that results from a field change other thandata validation. To validate the contents of the field, use the FieldEdit event. The FieldChange event applies to the field and row that just changed.FieldChange PeopleCode is often paired with RowInit PeopleCode. In theseRowInit/FieldChange pairs, the RowInit PeopleCode checks values in the component andinitializes the state or value of page controls accordingly. FieldChange PeopleCode thenrechecks the values in the component during page execution and resets the state orvalue of page controls. To take a simple example, suppose you have a derived/work field called PRODUCT, thevalue of which is always the product of page field A and page field B. When thecomponent is initialized, you would use RowInit PeopleCode to initialize PRODUCT equalto A × B when the component starts up or when a new row is inserted. You could thenattach FieldChange PeopleCode programs to both A and B which also set PRODUCT equalto A × B. Whenever a user changes the value of either A or B, PRODUCT is recalculated.FieldChange PeopleCode can be associated with record fields and component recordfields.
FieldDefault Event
 The FieldDefault PeopleCode event enables you to programmatically set fields to defaultvalues when they are initially displayed. This event is initiated on all page fields as partof many different processes; however, it triggers PeopleCode programs only when thefollowing conditions are all true:
 The page field is still blank after applying any default value specified in the recordfield properties. This is true if there is no default specified, if a null value is specified, or if a 0 isspecified for a numeric field.
 The field has a FieldDefault PeopleCode program.
Dinesh Kumar ©
 
In practice, FieldDefault PeopleCode normally sets fields by default when new data isbeing added to the component; that is, in Add mode and when a new row is inserted intoa scroll area.If a field value is changed, whether through PeopleCode or by a user, the IsChangedproperty for the row is set to True. The exception to this is when a change is done in theFieldDefault or FieldFormula events. If a value is set in FieldDefault or FieldFormula, therow is not marked as changed.At save time, all newly inserted and changed rows are written to the database. All newlyinserted but not changed rows are not written to the database. You must attach FieldDefault PeopleCode to the field where the default value is beingpopulated.
Note.
An error or warning issued from FieldDefault PeopleCode causes a runtime error.FieldDefault PeopleCode can be associated with record fields and component recordfields.
FieldEdit Event
Use FieldEdit PeopleCode to validate the contents of a field, supplementing standardsystem edits. If the data does not pass the validation, the PeopleCode program shoulddisplay a message using the Error statement, which redisplays the page, displaying anerror message and turning the field red. To permit the field edit but alert the user to a possible problem, use a Warningstatement instead of an Error statement. A Warning statement displays a warning dialogbox with OK and Explain buttons. It permits field contents to be changed and continuesprocessing as usual after the user clicks OK.If the validation must check for consistency across page fields, then use SaveEditPeopleCode instead of FieldEdit. The FieldEdit event applies to the field and row that just changed.FieldEdit PeopleCode can be associated with record fields and component record fields.
FieldFormula Event
 The FieldFormula event is not currently used. Because FieldFormula PeopleCode initiatesin many different contexts and triggers PeopleCode on every field on every row in thecomponent buffer, it can seriously degrade application performance. Use RowInit andFieldChange events rather than FieldFormula.
Dinesh Kumar ©

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->