jsf - p:progressBar animation does not match the value -


i use progress bar in code this:

<p:commandbutton value="#{msg['start.reindex']}"                  widgetvar="reindex"                  action="#{generalconfigbean.rebuildindex}"                  onclick="pf('pbajax').start(); pf('reindex').disable();"                  style="margin-left:25px;"/>  <p:progressbar id="progressbarpanel"                widgetvar="pbajax"                ajax="true"                value="#{generalconfigbean.progress}"                labeltemplate="{value}% #{msg['reindex.msg']}"                global="false"                styleclass="animated"                interval="10"                style=" width: 100px; margin-left: 40px;">      <p:ajax event="complete" oncomplete="pf('reindex').enable(); pf('pbajax').cancel();"/> </p:progressbar> 

and generalconfigbean this:

public class generalconfigbean extends basebean {      private integer progress;      public void rebuildindex() {         if (api.reindex()) {             showmessage("reindex.successful", facesmessage.severity_info);         } else {             showmessage("reindex.failed", facesmessage.severity_info);         }     }      public void setprogress(integer reindexpercentage) {         this.progress = reindexpercentage;     }      public integer getprogress() {         progress = api.reindexpercentage();         system.out.println(progress);         return progress;     } } 

when click button, value of progress bar increases until 100% , matches rebuildindex(), , when reaches 100% button enabled. animation in progress bar not match value , when rebuildindex done progress bar animation still works!

image below shows it:

enter image description here


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -