简体   繁体   English

Java Web项目上的多窗口

[英]Multi Windowing on a Java Web project

I have an EJB 2.1 Project (Actually, it must be migrated into EJB 3.1 :-)) 我有一个EJB 2.1项目(实际上,它必须迁移到EJB 3.1 :-))
Currently it supports only one window. 目前它只支持一个窗口。 it means the user should work on a window. 这意味着用户应该在窗口上工作。 It is because of the variables, used as session variables. 这是因为变量,用作会话变量。 (Last Search Criteria, last used id, etc...). (最后搜索条件,最后使用的ID等...)。

I want to make it possible to open two or more tabs in for example Firefox and work parallel. 我希望能够在Firefox中打开两个或更多选项卡并进行并行工作。 If the user is on the same tab, the variables should be kept only for that tab. 如果用户位于同一选项卡上,则应仅为该选项卡保留变量。 Only global variables can be valid for all tabs. 只有全局变量才能对所有选项卡有效。
How can i approach to this problem.?? 我怎样才能解决这个问题。
Any documentation to understand multiwindow will be also helpful. 任何了解多窗口的文档也会有所帮助。
Or any other idea or experiences about multiwindow web project is also welcome. 或者欢迎任何关于多窗口web项目的任何其他想法或经验。

There isn't any built-in way to deal with this in either browsers or any EJB that I am aware of. 在我所知道的浏览器或任何EJB中都没有任何内置的方法可以解决这个问题。 Other web app frameworks have the concept of Web Flows that are series of connected actions that can handle multiple flows in different tabs of the same browsers, so you may wish to start looking there. 其他Web应用程序框架具有Web流的概念,它是一系列连接的操作,可以处理同一浏览器的不同选项卡中的多个流,因此您可能希望开始查找。

In a nutshell, they create their own "cookies" that the application controls, not the browser itself. 简而言之,他们创建了应用程序控制的自己的“cookie”,而不是浏览器本身。 These "application cookies" are then used to stash chunks of information related to the current set of operations, much like a session. 然后,这些“应用程序cookie”用于存储与当前操作集相关的大量信息,就像会话一样。

These sorts of things are often kicked off by the user clicking a link that opens in a "new window" (or tab) that notifies the application (via a page hit or an ajax call) that a new "work session" is being opened and gets the inner-session set up. 用户点击在“新窗口”(或标签)中打开的链接会启动这些类型的事情,该链接通知应用程序(通过页面命中或ajax调用)正在打开新的“工作会话”并获得内部会话设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM