This content has been marked as final.
Show 3 replies
-
1. Re: rich:progressBar
ilya_shaikovsky Dec 8, 2009 8:49 AM (in response to user1234)
can anybody help me with a sample code to to achive that. In demo site i think the progressbar is increased based on interval.
progressBar just polls the server every interval in milis.. And it fetches some progress value holder. So just manage this property increasing it's value after every file and PB component will reflect it's changes. -
2. Re: rich:progressBar
user1234 Dec 9, 2009 8:08 AM (in response to user1234)public Long getCurrentValue(){ if (isEnabled()){ Long current = (new Date().getTime() - startTime)/1000; if (current>100){ setButtonRendered(true); }else if (current.equals(0)){ return new Long(1); } return (new Date().getTime() - startTime)/1000; } if (startTime == null) { return Long.valueOf(-1); } else return Long.valueOf(101); }
This is the method where the progress is getting counted by a time.
and Long current = (new Date().getTime() - startTime)/1000;
is the line where my progress value is getting increased. Instade of this how can i check with my files, if a file has been created i want to increased the progress bar. And after generating all the files the progressbar will show 100%... -
3. Re: rich:progressBar
ilya_shaikovsky Dec 9, 2009 2:09 PM (in response to user1234)yes.. that's what I meant - you should check some property which getting increased every time file created.