سؤال

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