Here is what I do,
I design a smart window with :
- a smarttoolbar
- a sdo (on order)
- a smartviewer (for order)
- inside the order sdo :
I write the initOrder (db required) procedure as follows :
PROCEDURE initOrder :
FIND customer where customer.custnum = rowobject.custnum no-lock
no-error.
IF AVAILABLE customer then do:
assign
rowobject.salesrep = customer.salesrep.
END.
PUBLISH dataAvailable FROM THIS-PROCEDURE ('SAME').
END PROCEDURE.
- inside the order viewer :
on LEAVE trigger on custNum field, i write the following code :
RUN initOrder IN dynamic-function('getdatasource':U).
END.
- The result we get :
- on modification, the viewer is correctly refreshed with the
customer.salesrep value
- on a newly created order record, the leave of custNum field has no
effect on the value displayed in the viewer.
Could you explain to me what is happening and If I am wrong how I can
refresh viewers from sdo values when in a creation phase.
Yours sincerely.
Sylvestre SEGURON
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
Hi
It's a wonder you get any output at all. The init-order procedure is
db-aware and hence will be compiled out of the client-side altogether. I
guess your running your code all on the client which is why it hangs
together.
I believe the code needs to become more appserver friendly in the
following way. This is a best shot at the new 9.1D stuff which I'm still
trying to pick up.
Do a connectserver, obtaincontextforserver and launch the server-side
using a procedure on the client-side. You can then do your find on the
server and return some info which sets the field on the client. You
server-side launch procedure will be responsible for launching your
dataobject using serverfilename which needs passing and you may also
need to make a call to applycontextfromclient.
In the end you can retrieve RowObject and make your call. I'm not sure
but you may need to use "DIFFERENT" to get the value passed.
-Original Message-
Sent: 26 September 2002 08:57
To: Adm2 Dev (E-mail)
Subject: tricky question about dataAvailable (example in
details)
Here is what I do,
I design a smart window with :
- a smarttoolbar
- a sdo (on order)
- a smartviewer (for order)
- inside the order sdo :
I write the initOrder (db required) procedure as follows :
PROCEDURE initOrder :
FIND customer where customer.custnum = rowobject.custnum no-lock
no-error.
IF AVAILABLE customer then do:
assign
rowobject.salesrep = customer.salesrep.
END.
PUBLISH dataAvailable FROM THIS-PROCEDURE ('SAME').
END PROCEDURE.
- inside the order viewer :
on LEAVE trigger on custNum field, i write the following code :
RUN initOrder IN dynamic-function('getdatasource':U).
END.
- The result we get :
- on modification, the viewer is correctly refreshed with the
customer.salesrep value
- on a newly created order record, the leave of custNum field has no
effect on the value displayed in the viewer.
Could you explain to me what is happening and If I am wrong how I can
refresh viewers from sdo values when in a creation phase.
Yours sincerely.
Sylvestre SEGURON
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
dear darren,
1) I'm sorry but i think it is not appserver related.
I modified my example so that the InitOrder proc in the sdo does not
require Db
access (and so unflagged DB Req flag).
The problem still exists.
Here are the details :
I design a smart window with :
- a smarttoolbar
- a sdo (on order)
- a smartviewer (for order)
Order SDO :
InitOrder /* procedure */ :
/*
Purpose:
Parameters:
Notes: DB NOT required
--*/
ASSIGN
rowobject.sales-rep = "XXX".
PUBLISH "dataAvailable" FROM THIS-PROCEDURE ("SAME").
END PROCEDURE.
Order viewer :
on LEAVE trigger on custNum field, i write the following code :
RUN initOrder IN dynamic-function('getdatasource':U).
END.
2) Secondly, As I said to somebody else earlier in my mails,
I do not see why I should put publish dataavailable "different" as :
- at this point we are dealing with, in the case of a creation, the
record has
already been created.
- as it has been created, the sdo has created a rowobject record (etc,
etc)
and published a dataavailable 'different' for the viewers to display
the
values of the new record.
- what is written above has already been done at the point we are working
on.
- and what we do in our phase is UPDATING a newly created record and
WANTING
to inform viewers that values have been updated => so this is the
publish
dataAvailable 'same' (Let me tell you again that this procedure works
correctly on an existing record, that let me think that there is a
specifity
with dataAvaliable publication on a newly created record that prevent
the
viewers from being informed or that prevent the sdo from sending the
information).
So you guys who may have the insight knowledge of Progress ADM2, please tell
me what is happening (just these guys please, sorry for the others).
Thanks
Sylvestre
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
Sylvestre,
The 'SAME' is just returned from child SDOs, so it only reaches visual
objects. Visual object's DataAvailable does not call DisplayRecord while its
NewRecord is 'ADD' or 'COPY'.
Since you say that it works for update, I assume that you have several
viewers using the same DataSource. But in order for the other viewers to
have NewRecord set to 'ADD' they must have a groupAssign link. But if they
do have this then displaying data to them would overwrite changes.
I think you need to exaplain some more details on links and objects, so we
can understand if you are running into a bug or if it is expected behavior
that you need to override/customize/workaround.
Have you tried to run displayRecord directly in the visual object(s)? You
must make sure you do not do this in a browse if a viewer has the new
record though.
HÃ¥vard
-Original Message-
Sent: Friday, September 27, 2002 6:25 AM
To: 'dev@adm2.possenet.org'
Subject: RE: tricky question about dataAvailable (example in
details)
dear darren,
1) I'm sorry but i think it is not appserver related.
I modified my example so that the InitOrder proc in the sdo does not
require Db
access (and so unflagged DB Req flag).
The problem still exists.
Here are the details :
I design a smart window with :
- a smarttoolbar
- a sdo (on order)
- a smartviewer (for order)
Order SDO :
InitOrder /* procedure */ :
/*
Purpose:
Parameters: Notes: DB NOT required
--*/
ASSIGN
rowobject.sales-rep = "XXX".
PUBLISH "dataAvailable" FROM THIS-PROCEDURE ("SAME").
END PROCEDURE.
Order viewer :
on LEAVE trigger on custNum field, i write the following code :
RUN initOrder IN dynamic-function('getdatasource':U).
END.
2) Secondly, As I said to somebody else earlier in my mails,
I do not see why I should put publish dataavailable "different" as :
- at this point we are dealing with, in the case of a creation, the
record has
already been created.
- as it has been created, the sdo has created a rowobject record (etc,
etc)
and published a dataavailable 'different' for the viewers to display
the
values of the new record.
- what is written above has already been done at the point we are working
on.
- and what we do in our phase is UPDATING a newly created record and
WANTING
to inform viewers that values have been updated =so this is the
publish
dataAvailable 'same' (Let me tell you again that this procedure works
correctly on an existing record, that let me think that there is a
specifity
with dataAvaliable publication on a newly created record that prevent
the
viewers from being informed or that prevent the sdo from sending the
information).
So you guys who may have the insight knowledge of Progress ADM2, please tell
me what is happening (just these guys please, sorry for the others).
Thanks
Sylvestre
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
Havard,
I think we do not have a problem with ADM2.
But we have the following need :
- in phase of record creation (and record update),
we need to update displayed fields content on basis of a value typed
in another field.
and we may need to refresh fields on several viewers as we may have
group assigned viewers.
- going through the SDO and dataAvailable publication seemed a good
solution
for record update.
- but as we need to implement a unique solution (for the sake of
maintainability) the solution of :
(starting from the viewer where the field is updated)
- getting the data from the SDO (by a procedure call)
- managing the display of values returned in all the group
assigned
viewers (through the use of displayfields function on the
different viewers)
may be the only viable. We are working on this solution.
Please tell us if we are going in the right direction, and if we don't loose
our energy doing things awkwardly, ADM2 speaking.
Thanks for your valuable feedback.
Sylvestre SEGURON
-Message d'origine-
Envoyé : vendredi 27 septembre 2002 16:15
À : dev@adm2.possenet.org
Objet : RE: tricky question about dataAvailable (example in
details)
Sylvestre,
The 'SAME' is just returned from child SDOs, so it only reaches visual
objects. Visual object's DataAvailable does not call DisplayRecord while its
NewRecord is 'ADD' or 'COPY'.
Since you say that it works for update, I assume that you have several
viewers using the same DataSource. But in order for the other viewers to
have NewRecord set to 'ADD' they must have a groupAssign link. But if they
do have this then displaying data to them would overwrite changes.
I think you need to exaplain some more details on links and objects, so we
can understand if you are running into a bug or if it is expected behavior
that you need to override/customize/workaround.
Have you tried to run displayRecord directly in the visual object(s)? You
must make sure you do not do this in a browse if a viewer has the new
record though.
HÃ¥vard
-Original Message-
Sent: Friday, September 27, 2002 6:25 AM
To: 'dev@adm2.possenet.org'
Subject: RE: tricky question about dataAvailable (example in
details)
dear darren,
1) I'm sorry but i think it is not appserver related.
I modified my example so that the InitOrder proc in the sdo does not
require Db
access (and so unflagged DB Req flag).
The problem still exists.
Here are the details :
I design a smart window with :
- a smarttoolbar
- a sdo (on order)
- a smartviewer (for order)
Order SDO :
InitOrder /* procedure */ :
/*
Purpose:
Parameters: Notes: DB NOT required
--*/
ASSIGN
rowobject.sales-rep = "XXX".
PUBLISH "dataAvailable" FROM THIS-PROCEDURE ("SAME").
END PROCEDURE.
Order viewer :
on LEAVE trigger on custNum field, i write the following code :
RUN initOrder IN dynamic-function('getdatasource':U).
END.
2) Secondly, As I said to somebody else earlier in my mails,
I do not see why I should put publish dataavailable "different" as :
- at this point we are dealing with, in the case of a creation, the
record has
already been created.
- as it has been created, the sdo has created a rowobject record (etc,
etc)
and published a dataavailable 'different' for the viewers to display
the
values of the new record.
- what is written above has already been done at the point we are working
on.
- and what we do in our phase is UPDATING a newly created record and
WANTING
to inform viewers that values have been updated =so this is the
publish
dataAvailable 'same' (Let me tell you again that this procedure works
correctly on an existing record, that let me think that there is a
specifity
with dataAvaliable publication on a newly created record that prevent
the
viewers from being informed or that prevent the sdo from sending the
information).
So you guys who may have the insight knowledge of Progress ADM2, please tell
me what is happening (just these guys please, sorry for the others).
Thanks
Sylvestre
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
I do not see how dataAvailable can be published safely during an update or
add. It will redisplay ALL data. This does not make any sense in the middle
of an update/add as all changes will be lost.
You will probably be better off implementing dedicated methods that can
display specified fields.
HÃ¥vard
-Original Message-
Sent: Friday, September 27, 2002 11:34 AM
To: 'dev@adm2.possenet.org'; 'hdaniels@progress.com'
Subject: RE: tricky question about dataAvailable (example in
details)
Havard,
I think we do not have a problem with ADM2.
But we have the following need :
- in phase of record creation (and record update),
we need to update displayed fields content on basis of a value typed
in another field.
and we may need to refresh fields on several viewers as we may have
group assigned viewers.
- going through the SDO and dataAvailable publication seemed a good
solution
for record update.
- but as we need to implement a unique solution (for the sake of
maintainability) the solution of :
(starting from the viewer where the field is updated)
- getting the data from the SDO (by a procedure call)
- managing the display of values returned in all the group
assigned
viewers (through the use of displayfields function on the
different viewers)
may be the only viable. We are working on this solution.
Please tell us if we are going in the right direction, and if we don't loose
our energy doing things awkwardly, ADM2 speaking.
Thanks for your valuable feedback.
Sylvestre SEGURON
-Message d'origine-
Envoyé : vendredi 27 septembre 2002 16:15
À : dev@adm2.possenet.org
Objet : RE: tricky question about dataAvailable (example in
details)
Sylvestre,
The 'SAME' is just returned from child SDOs, so it only reaches visual
objects. Visual object's DataAvailable does not call DisplayRecord while its
NewRecord is 'ADD' or 'COPY'.
Since you say that it works for update, I assume that you have several
viewers using the same DataSource. But in order for the other viewers to
have NewRecord set to 'ADD' they must have a groupAssign link. But if they
do have this then displaying data to them would overwrite changes.
I think you need to exaplain some more details on links and objects, so we
can understand if you are running into a bug or if it is expected behavior
that you need to override/customize/workaround.
Have you tried to run displayRecord directly in the visual object(s)? You
must make sure you do not do this in a browse if a viewer has the new
record though.
HÃ¥vard
-Original Message-
Sent: Friday, September 27, 2002 6:25 AM
To: 'dev@adm2.possenet.org'
Subject: RE: tricky question about dataAvailable (example in
details)
dear darren,
1) I'm sorry but i think it is not appserver related.
I modified my example so that the InitOrder proc in the sdo does not
require Db
access (and so unflagged DB Req flag).
The problem still exists.
Here are the details :
I design a smart window with :
- a smarttoolbar
- a sdo (on order)
- a smartviewer (for order)
Order SDO :
InitOrder /* procedure */ :
/*
Purpose:
Parameters: Notes: DB NOT required
--*/
ASSIGN
rowobject.sales-rep = "XXX".
PUBLISH "dataAvailable" FROM THIS-PROCEDURE ("SAME").
END PROCEDURE.
Order viewer :
on LEAVE trigger on custNum field, i write the following code :
RUN initOrder IN dynamic-function('getdatasource':U).
END.
2) Secondly, As I said to somebody else earlier in my mails,
I do not see why I should put publish dataavailable "different" as :
- at this point we are dealing with, in the case of a creation, the
record has
already been created.
- as it has been created, the sdo has created a rowobject record (etc,
etc)
and published a dataavailable 'different' for the viewers to display
the
values of the new record.
- what is written above has already been done at the point we are working
on.
- and what we do in our phase is UPDATING a newly created record and
WANTING
to inform viewers that values have been updated =so this is the
publish
dataAvailable 'same' (Let me tell you again that this procedure works
correctly on an existing record, that let me think that there is a
specifity
with dataAvaliable publication on a newly created record that prevent
the
viewers from being informed or that prevent the sdo from sending the
information).
So you guys who may have the insight knowledge of Progress ADM2, please tell
me what is happening (just these guys please, sorry for the others).
Thanks
Sylvestre
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org
For additional commands, e-mail: dev-help@adm2.possenet.org