简体   繁体   English

Tapestry-基于后端事件更新UI

[英]Tapestry - update UI based on a backend event

I am using Tapestry 4.1. 我正在使用Tapestry 4.1。 I have a process running in the background. 我有一个在后台运行的进程。 Once the process completes, I want to refresh a text in my UI. 该过程完成后,我想刷新UI中的文本。 I am new to tapestry. 我是挂毯新手。 It would be helpful if somebody can point out tapestry components I can use for this purpose. 如果有人可以指出我可以用于此目的的挂毯组件,这将很有帮助。

just like any web application, you will need to set up some kind of polling mechanism from your browser to your server (ie an ajax request on a timer). 就像任何Web应用程序一样,您将需要设置从浏览器到服务器的某种轮询机制(即,计时器上的ajax请求)。

i can't remember how i used to script ajax requests to event listeners in tapestry 4.1 but i do remember doing it. 我不记得我以前如何在Tapestry 4.1中编写对事件监听器的Ajax请求的脚本,但是我确实记得这样做。

i could tell you how to do it with tapestry 5 however. 我可以告诉你如何用挂毯5做到这一点。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM