문제

So I am trying to poll a counter from a loop every second with a4j:poll.

So if I have a loop like this:

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
}

My question: is it possible to use a4j:poll to check how many files have been downloaded so far even though the loop is still executing?

도움이 되었습니까?

해결책

That's not possible. (Not even by updating the component from inside the loop)

What does your loop do? If it just checks the filecount then it's running needlessly, you can use the poll the check the filecount at each interval.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top