7 Replies Latest reply on Oct 9, 2008 9:00 AM by andrei_exadel

    progress bar pooling and

    elik

      Hi.
      I have a strange problem with "enabled" attribute of progress bar.
      This attribute is successfuly setted to "true" when I start my process.
      But when process is finished and in backing bean corresponding property is setted to false,
      this change is not propagated to the "enabled" attribute.
      So, pooling process is never stopped :(

      My page structure is following

       data panel
       ....
       <a4j:outputPanel id="progressPanel" layout="block">
       <div class="left">
       <a4j:commandButton value="Start" disabled="#{pageBean.processLaunched}" action="#{pageBean.startProcess}"
       reRender="progressPanel, dataPanel" />
       </div>
       <div class="right">
       <h:panelGrid id="progressGrid" rendered="#{pageBean.processLaunched}" columns="2">
       <h:outputText value="Progress status:" />
      
       <rich:progressBar value="#{pageBean.processedRows}" interval="5000"
       label="#{pageBean.processedPercent} %"
       minValue="-1" maxValue="#{pageBean.declaredRows}"
       enabled="#{pageBean.processLaunched}"
       reRenderAfterComplete="progressPanel, dataPanel">
       </rich:progressBar>
       </h:panelGrid>
       </div>
       </a4j:outputPanel>
      


      This block and panel with data are surrounded by <a4j:form> tag. When I click on start button, startProcess action is fired and boolean "processLaunched" property in pageBean is setted to true. After process completion this property contains "false" value (I see this by means of logging property value to the log file from getter method) but pooling is continued and button is disabled :(

      What do you think about this "strangeness"?
      Thanks.

      P.S. I use JSF 1.2_07 and Facelets 1.1.14. Backing bean has "session" scope.



        • 1. Re: progress bar pooling and

          What RF version do you use?

          • 2. Re: progress bar pooling and
            elik

            The latest one... 3.2.2.GA

            • 3. Re: progress bar pooling and
              elik

              Maybe, this is not the problem of the "enabled" attribute. I have the same condition of the "rendered" attribute of the command button, that starts the progress. And this button is not became enabled too... Unfortunatly, I can't determine the main reason of this problem exactly.

              • 4. Re: progress bar pooling and
                elik

                Sorry, I meant "disabled" attribute of the command button.

                • 5. Re: progress bar pooling and

                  Hi,

                  When I looked into this I found that progress bar dont stop polling after enabled attribute has been changed on server.
                  I added this issue to JIRA and fixed it: https://jira.jboss.org/jira/browse/RF-4585.

                  But I see this is not a cause of your problem because your command button cannot become enabled.
                  Seems you did not re-render components after process finished.
                  If you have progress bar all time polling it means that progress bar value never reach to max value.

                  Anyway I can't say more without server side code posted here.

                  • 6. Re: progress bar pooling and
                    elik

                    Thanks for quick reply :) But as you can see from above code, I reRender progressPanel after progress completion (reRenderAfterComplete="progressPanel..."). This panel contains my button, so I expect to see enabled button after "reRenderAfterComplete" action is completed. So, I think these things are coupled.

                    • 7. Re: progress bar pooling and

                      You right in case if you sure that progressBar reaches complete state.
                      I mean may be server sets enabled to false before max value got.
                      So, process finished, but progress bar continue polling.

                      You should be sure that sure that #{pageBean.processLaunched} triggers to false ONLY after complete state has been reached.