更新时间:2022-05-29 22:01:50
这是不可能从支持bean的操作方法中。另外有一个,而(真)
是非常CPU的效率不高,你宁愿要避免在多用户环境。你在寻找什么是AJAX轮询/推。此不提供在标准JSF实现,也不会在战斧。 PrimeFaces 例如,支持AJAX轮询/推组件的 <电话号码:调查>
和的 <号码:推>
That's not possible from inside the backing bean action method. Also having a while(true)
is very CPU-inefficient, you'd rather like to avoid that in a multi-user environment. What you're looking for is ajax poll/push. This is not provided in the standard JSF implementation and also not in Tomahawk. PrimeFaces for example, supports ajax poll/push components <p:poll>
and <p:push>
.