简体   繁体   English

每次使用Oracle ADF和JAVA打开新的浏览器选项卡时,如何强制创建新会话?

[英]How can I force to create a new session every time I open a new browser tab with Oracle ADF and JAVA?

I'm developing a web application with oracle-ADF. 我正在使用oracle-ADF开发一个Web应用程序。 I have a page with information of client, when i open a new page with an id of another client, and I reload the page, I will have he same information. 我有一个包含客户端信息的页面,当我打开一个具有另一个客户端ID的新页面,并重新加载该页面时,我将获得与他相同的信息。 The session is shared between the pages. 会话在页面之间共享。 The browser is IE. 浏览器是IE。

How can I force to create a new session every time I open a new browser tab? 每次打开新的浏览器选项卡时,如何强制创建新会话?

You have to specify a smaller scope to the taskflow of your page as it is set to session scope by default. 您必须为页面的任务流指定较小的作用域,因为默认情况下将其设置为会话作用域。 (Data persist in the session variable of your browser) (cf. https://docs.oracle.com/cd/E15051_01/web.1111/b31974/adf_lifecycle.htm#ADFFD524 figure 21.3) (数据保留在浏览器的会话变量中)(参见https://docs.oracle.com/cd/E15051_01/web.1111/b31974/adf_lifecycle.htm#ADFFD524图21.3)

By default, the binding container and the binding objects it contains are defined in session scope. 默认情况下,绑定容器及其包含的绑定对象是在会话作用域中定义的。 However, the values referenced by value bindings and iterator bindings are undefined between requests and for scalability reasons do not remain in session scope. 但是,在请求之间未定义值绑定和迭代器绑定引用的值,并且出于可伸缩性原因,这些值未保留在会话范围内。 Therefore, the values that binding objects refer to are valid only during a request in which that binding container has been prepared by the ADF lifecycle. 因此,绑定对象引用的值仅在ADF生命周期已准备好该绑定容器的请求期间有效。 What stays in session scope are only the binding container and binding objects themselves. 保留在会话范围内的仅仅是绑定容器和绑定对象本身。

Use as follow : 用途如下:

  • ApplicationScope : widest Scope. ApplicationScope:最广泛的范围。 data will be available even when you close and open the application again 即使您再次关闭并打开应用程序,数据仍然可用
  • SessionScope : Data will be available as a cookie in your web browser SessionScope:数据将在您的Web浏览器中以cookie的形式提供
  • PageFlowScope : Data will be available in the current tab. PageFlowScope:数据将在当前选项卡中可用。 (you'll have different data if you open another window tab) The data will be available from one page to another (如果打开另一个窗口选项卡,将有不同的数据)数据将在一页到另一页之间可用
  • viewScope : Data will be available only on the current display tab and will not persist when you navigate. viewScope:数据将仅在当前显示选项卡上可用,并且在导航时将不会保留。 (this may be what you are looking for) (这可能是您要寻找的)
  • backingBeanScope : Data will be different for each element of your page. backingBeanScope:页面的每个元素的数据将有所不同。

暂无
暂无

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

相关问题 使用Java EE和GWT,如何在同一服务器上打开Web应用程序的新浏览器选项卡? - With Java EE and GWT, how can I open a new browser tab to a web app on the same server? 如何在不通过浏览器打开新标签的情况下通过JAVA在浏览器中打开网站 - How do I open a website in browser through JAVA without having the browser open a new tab 每次使用Java运行程序时如何创建新文件 - How can I create a new file every time I run the program using Java 如何使用Java将会话限制为单个浏览器选项卡 - How can I use Java to restrict the session to a single browser tab 如何创建链接以在Java(NetBeans)的新选项卡中打开网站 - how do i create a link to open a website in new tab at java (netbeans) 每当我从键盘(java)输入新数字时,如何将数字存储到数组中? - How can I store numbers into array every time I input a new number from keyboard (java)? 如何通过将Selenium WebDriver与Java一起在同一浏览器中打开新标签页? - How to open a new tab in the same browser by using Selenium WebDriver with Java? 如何在新的浏览器选项卡java中打开用itext 7生成的pdf文件 - How to open a pdf file generated with itext 7 in new browser tab java 我需要协助来创建一个函数,该函数将从Java(Selenium)的CSV文件中读取(打开新的浏览器标签)url - I need assistance in creating a function that will read (open new browser tab)url from CSV file in Java (Selenium) 使用Java在同一浏览器中打开新标签页 - using java to open a new tab in the same browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM