Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing values between forms
#4
(04-22-2021, 03:07 PM)Hexsol Wrote: Hi, thanks for the reply.
Think I have now sorted it by changing the  servercontroler properties
SessionOptions.UniqueURL to true
SecurityOptions.SurrogateSession to false
This looks like it has fixed the issue of one session overwriting the public variables of another.

Thanks again for your help.

It is best to think of it a little differently, keeping in mind what a "session" is.  

Your first instinct of keeping "session persistent" data in the UserSession is correct.  If you are accessing UserSession data from more than one browser window it sounds like you are attempting to have two browser windows operating on the same session?   It's not clear from your description but, if that's what you have in mind, you will likely have other issues.  

Having multiple windows working on the same session is not a simple (or recommended) thing.  What are you trying to accomplish?

Dan

(04-22-2021, 12:05 PM)Jose Nilton Pace Wrote: Hi, I have a user ID logged into the system, shared with the forms as follows:
Code:
unit UserSessionUnit;
  private
    { Private declarations }
    xJNP_Id: Integer;
  public
    { Public declarations }
    property gJNP_Id: Integer read xJNP_Id write xJNP_Id;

In login form, after user logged in:
Code:
UserSession.gJNP_Id := FDQ_UsrId.Value;

You're certainly the expert on this but I'm trying to understand what you are doing.

Are you having multiple browser sessions connected to the same IW session?  If so, how do you deconflict when the browsers launch multiple threads against the same session?   It doesn't matter with Integers as you've shown above but with other data?  Is IW doing this internally by session?

It makes my head hurt.

Thanks,
Dan

Weird: The above message was actually two separate messages a few minutes apart. One in reply to Hexsol, one to Jose.

Somehow the forum combined them.

Dan

Hah! And a third one!
Reply


Messages In This Thread
Passing values between forms - by Hexsol - 04-22-2021, 09:09 AM
RE: Passing values between forms - by Hexsol - 04-22-2021, 03:07 PM
RE: Passing values between forms - by DanBarclay - 04-22-2021, 07:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)