1

I have page1.jsf and page2.jsf. Page1 has <p:ajaxstatus/> with custom spinner in it . When an action is performed on page 1 and the user is redirected to page 2, the spinner starts and stops immediately but page1 remains as it is and after few seconds page2 is loaded and is rendered.

How can I keep the spinner spinning until page2 is fully rendered.

4

1 回答 1

0

我假设您正在为 page1 使用@ViewScopedbean。

当您重定向到 page2 时,视图被创建到 page2,并且 page1 的视图范围 bean 被取消引用/销毁。因此忽略对该 bean 的 Ajax 请求。

我知道的唯一解决方案是将 bean 设置为page1as @SessionScoped,但这可能会影响您的应用程序的行为。

于 2013-01-03T20:14:09.263 回答