Forum  General Visual ...  Let's Chat Abou...  Context scope
Previous Previous
 
Next Next
New Post 8/16/2012 7:59 AM
  dpmathews
18 posts
No Ranking


Context scope 

I am trying to get a better understanding of the Context scope.  From the articles that I have read, I get the impression that it is a further way to subdivide the Session scope.

The application that we are building has a requirement that the user can have multiple windows open, most likely in the same browser session.  With some browsers, this means that both windows will use the same Session variables.  However, we want each window to have a unique place in which to store certain data.  Does Context scope allow us to do that?

Thanks,

Dave

 
New Post 8/16/2012 2:09 PM
  palli
14416 posts
1st Level Poster




Re: Context scope 

 Hi Dave,

You are understanding correctly the Context scope. I think this article here should explain the whole thing.

Generally speaking, each form you open in your browser will create a new context if one is not already existing. This means if you open form1 in one tab and form2 in the other, each will have its own and seperate context scope. Make sure you notice what Context.Transfer does from the article above. 

You are probably already aware of it, but make sure you also realize that if you open Form1 in one tab and then again Form1 in another tab of the same browser (same form in two tabs), this is actually the same form1 instance that you see in both of your tabs. You will need to make arrangements if you want it to be a seperate instance, according to this article here for instance. 

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 8/17/2012 4:51 AM
  dpmathews
18 posts
No Ranking


Re: Context scope 
Modified By dpmathews  on 8/17/2012 9:08:43 AM)

Palli,

This looks very promising to achive one of the design goals for our application.  The designers want to be able to open multiple concurrent browser windows and have them basically be separate instances.

I'm afraid that one thing stands in the way however.  Another requirement is that the browser back/forward buttons work in the application.  To do this, we are using the ThreadBookmark to set the browser history.  When I did some testing yesterday with two Firefox browser windows, I found that they stepped on each other's browser history.  I am assuming that there is only one ThreadBookmark queue per session, so both browser instances were using the same queue.  Is that a correct assumption?  If so, will the ForcePageInstance help in this case?

EDIT: Palli, I did some further testing and it seems that the back/forward buttons are OK when using multiple windows.  The only problem I ran into is when I clicked the browser back button and left my VWG application.  For example, if I bring up a new browser window it goes to our intranet page.  I enter the URL for our application in the window and bounce around.  If I use the back button all the way to the home page, then back again to our intranet page, the forward buttons then do not go to the proper place.  That is only a minor annoyance.  I just wanted to let you know the new things I found and see if this matches what your experience has been in the past.

Thanks,

Dave

 
New Post 8/26/2012 6:13 AM
  palli
14416 posts
1st Level Poster




Re: Context scope 

 Hi Dave,

Thanks for the update.

When you say that hitting the forward button to re-enter your VWG application and then you "...do not go to the proper place", then where does it actually go and where do you want it to go?

If a new form instance is created when you enter the application, then the forward button would bring you to the VWG form just like it has just been loaded. 

If the same form instance will be used when you press the forward button, you would be taken to the VWG form with the status it had when you left it. 

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  Let's Chat Abou...  Context scope
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS