-
1. Re: rich:progressBar issue
iabughosh Nov 15, 2011 1:51 AM (in response to ashis3011)Hi Sahoo, welcome to the community, when you reach 100 (or your max limit) set progress bar enabled attribute to false.
-
2. Re: rich:progressBar issue
ashis3011 Nov 15, 2011 2:04 AM (in response to iabughosh)Hi Ibrahim - Thanks for your reply. I did change backing bean code to set false if I reach 100 (max limit), but still it is calling getCurrentValue() in the backing bean infinitely. I do not able to figure it out what do I miss.
My updated backing bean method is:
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(
100
);
}
}
I would appreciate any input.
Thanks
A.
-
3. Re: rich:progressBar issue
iabughosh Nov 15, 2011 4:35 AM (in response to ashis3011)is your bean scope (request), if yes try changing it to View or Session scope.
-
4. Re: rich:progressBar issue
ashis3011 Nov 15, 2011 12:30 PM (in response to iabughosh)Hi Ibrahim- Thanks for your reply. My bean scope is session scope already.
-
5. Re: rich:progressBar issue
iabughosh Nov 15, 2011 2:36 PM (in response to ashis3011)please attach your bean & .xhtml source.
-
6. Re: rich:progressBar issue
ashis3011 Nov 15, 2011 4:27 PM (in response to iabughosh)Hi Ibrahim- I solved the problem. The problem was render="progressPanel", I was refreshing the same panel where the progress bar was there. It was causing infinite loop. So the final tag should:
<rich:progressBar id="pb" mode="ajax" value="#{progressBarBean.currentValue}"
label="#{progressBarBean.currentValue} %" interval="1000"
minValue="0" maxValue="100" enabled="#{progressBarBean.enabled}"
ignoreDupResponses="true" reRenderAfterComplete="out">
</rich:progressBar>
Thanks for your reply.
Ashis