Hi,
I think that your code should work, but it is more complicated than it
needs to be.  When you are in a button-driven web event method, you don't
need to load the page in order to display it.  You can just call
'display()' when you're ready.

Without knowing everything you are doing, I can't say for sure that you can
eliminate the use of page session objects entirely.  But, when you are in a
web event method, you don't need to use a page session object in order to
display a current value.  Just put the value into a member variable, and
then your 'display' processing can pull it out of there.

-- Curt Springer, Team ND

At 10:34 AM 6/8/99 +0530, Nagendra B wrote:
>Hi,
>
>As such i am not facing any problems but i still dout, 
>whether or not we can use putPageSessionObject() in btnSave_onWebEvent() 
>and btnrefresh_onWebEvent() events 
>and getPageSessionObject in this_onBeforeDisplayEvent()...
>
>Will this do any romance in MULTI USER ENVIRONMENTS?...
>
>Suggestions are greatly appreciated...
>
>Here goes the code i have been using:
>
>this_onBeforeDisplayEvent()
>{
>       ......
>       try
>       {       ....
>               year=getPageSessionObject("YEAR").intValue();
>               month=getPageSessionObject("MONTH").intValue();
>               ....
>       }
>       catch(NullPointerException e)
>       {
>               //Get Server year and month
>               CSpDatetime date = new CSpDatetime();
>               year = date.getYear();
>               month=date.getMonth() + 1;
>               .......
>       }
>       ......
>}
>btnSave_onWebEvent()
>{
>       ..........
>       putPageSessionObject("YEAR", new CSpInteger(_year));
>       return this.load();
>}
>
>btnRefresh_onWebEvent()
>{
>       .........
>       putPageSessionObject("YEAR", new CSpInteger(_year));
>       putPageSessionObject("MONTH", new CSpInteger(_month));
>       return this.load();
>}
>
>_________________________________________________________________________
>
>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