Consultor Eletrônico



Kbase P122855: Entry trigger fires before displayRecord in OpenEdge 10
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/26/2007
Status: Unverified

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x

SYMPTOM(s):

Entry trigger fires before displayRecord in OpenEdge 10

In version 9 an entry trigger on a smartDataViewer datafield, fires after displayRecord. In OpenEdge 10, the entry trigger fires before displayRecord.

There is a change in behavior in the order that Entry triggers and displayRecord are run between Progress 9.1x and OpenEdge 10.

CAUSE:

This is a known issue being investigated by Development

FIX:

There are two possible ways to work around this as follows:

The first is to add some additional code local to the smartDataViewer that experiences the problem. For example, in the smartDataViewer Entry trigger for the field in question, add the code:
on entry...
define variable hCont as handle no-undo.
hCont = {fn getContainerSource}.
if NOT {fn getObjectHidden hCont} then
do:
<logic that only works after display>
end.
end.
Then in an intializeObject override procedure after RUN SUPER run the following:
RUN applyEntry in TARGET-PROCEDURE (INPUT ?).
This will ensure that the entry trigger fires after displayRecord.


The second method is a more generic solution to customize the ADM by copying datavis.p into a local 'src\adm2' override. Then modify the updateMode procedure as follows:
def var lUserCall.
if source-procedure = tableioSource then
do:
<existing code>
lUserCall = true.
end.
....
if modify or edit
....
if lUserCall and iFieldsEnabled .....
run applyEntry
....

Ensure this is in the propath before the standard code so that it is run correctly.
It may still be required to override initializeObject locally in the viewer in order to 'applyEntry'. If this is needed then create a local parallel viewercustom.p, do it here.