【问题标题】:Using a4j:poll to check how many files have been downloaded使用 a4j:poll 检查下载了多少文件
【发布时间】:2013-09-16 17:56:22
【问题描述】:

所以我尝试使用 a4j:poll 每秒从循环中轮询一个计数器。

如果我有这样的循环:

while(fileCount != 100){
     //count the # of files in dir, assuming these files are being downloaded to the dir
     //so the # of files is always changing
}

我的问题:即使循环仍在执行,是否可以使用 a4j:poll 来检查到目前为止已下载了多少文件?

【问题讨论】:

    标签: jsf richfaces polling ajax4jsf


    【解决方案1】:

    这是不可能的。 (即使从循环内部更新组件也不行)

    你的循环是做什么的?如果它只是检查文件计数然后它不必要地运行,您可以使用轮询在每个间隔检查文件计数。

    【讨论】:

      猜你喜欢
      • 2011-03-31
      • 1970-01-01
      • 2015-06-02
      • 1970-01-01
      • 2021-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多