this_onBeforeDisplayEvent ( that is, for the page) is too early to do a
setDisplayFieldValue(). When the display() method is called on the Page
components afterwards and the earlier setValue() loses its effect. What
surprises me is that you say it works sometimes. 

The right place to do setValue() or setDisplayFieldValue() is the
concernedElement_onBeforeDisplayEvent(). In case you determine the value
in this_onBeforeDisplay(), you can temporarily keep it in an instance
variable.


Aby

-----Original Message-----
From: Sheila Hearn [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 10, 1999 8:47 AM
To: [EMAIL PROTECTED]
Subject: [ND] Problem using setDisplayFieldValue



I have a page that contains a static text field.  In the
onBeforeDisplayEvent for the
page, I execute the code below which uses a user session object to set
the value
of the static text field.  When the page is displayed the static text
field is empty, but
the user session object & the static text field contain the correct
value when they are
written to the log.   The page works fine when its load method is
executed from an
onWebEvent of another page.  I'm having problems with it when the load
method is 
executed from a data objects onDataBaseErrorEvent.  Does anybody have
any idea
of what could cause this? 

String msg = CSpider.getUserSessionObject("usMessage").toString();
CSpLog.send(this,CSpLog.ERROR, "session object - " + new
CSpString(msg));
setDisplayFieldValue("stMsg",
CSpider.getUserSessionObject("usMessage"));
CSpLog.send(this,CSpLog.ERROR, "static text field - " +
                                      new
CSpString(getDisplayFieldValue("stMsg").toString()));
  

   
________________________________________________________________________
_

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to:
http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to