[英]JSF View Scope does not shutdown
First: 第一:
I have two Managed Beans. 我有两个Managed Bean。
Bean A: 豆A:
Bean B: 豆B:
I do following; 我照做;
The Problem is following: 问题如下:
If I am loading the JSF site with Bean A again, the PostConstruct which is initializing the datatable is not loaded again. 如果我再次使用Bean A加载JSF站点,则不会再次加载初始化数据表的PostConstruct。
I thought that if I use the view scope, the ManagedBean would be destroyed if I navigate through different JSF sites. 我以为如果使用视图范围,则在不同的JSF站点之间导航时,ManagedBean将被破坏。
Please help me to understand this Problem. 请帮助我了解此问题。 What am I doing wrong? 我究竟做错了什么?
It should yes. 应该是。 The view scope should stay in-tact for as long as you stay on the same view. 只要您停留在同一视图上,视图范围就应该保持完整。
There have been many problems with this scope in past versions of JSF however, including relating to PostConstruct; 但是,在过去的JSF版本中,此范围存在很多问题,包括与PostConstruct有关的问题; which version are you using right now? 您正在使用哪个版本? It should mention that in the logs during application startup. 应该在应用程序启动期间的日志中提及。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.