从线程访问 FacesContext
在我的 JSF 应用程序中,我需要显示来自另一个线程的 FacesMessage。根据文档,这是不可能的。但也许有一些技巧可以做到这一点?我看不到其他方法来做我不想做的事:(
In my JSF app I need to display FacesMessage from another thread. Acording to docs it's not possible. But maybe there is some trick to do so? I can't see another way to do what I wan't to :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您可以通过 ICEfaces 服务器端推送的异步后台工作来解决您的问题。
请查看http://auctionmonitor.icefaces.org/auctionMonitor/auctionMonitor.jsf 推送技术的示例。
您的后台工作线程可以执行“推送”,这将“通知”某些页面更新(部分)并显示您的消息。
Maybe you can solve your problem with asynchronous background work with ICEfaces server side push.
Pleas take a look at http://auctionmonitor.icefaces.org/auctionMonitor/auctionMonitor.jsf for an example of the push technology.
Your background working thread could perform a "push", which will "notify" certain pages to update (partially) and display your message.