[英]Is there a way to autostart progress bar in primefaces?
I have a progressbar which is rendered based on a dropDownMenu value. 我有一个基于dropDownMenu值呈现的进度条。 After loading the progressbar, I need to start it somehow automatically or any workaround?
加载进度条后,我需要以某种方式自动启动它或采取任何解决方法?
<p:progressBar widgetVar="pbAjax" ajax="true" value="#{myBean.progress}"
labelTemplate="{value}%" styleClass="animated" global="false"/>
To start progress bar: 要启动进度栏:
PF('pbAjax').start(); PF('pbAjax')。start();
You'd like to show the progressBar when user changes item? 您想在用户更改项目时显示progressBar吗? I guess you use a Primefaces dropdown.
我猜您使用的是Primefaces下拉列表。 If so, add the
onChange
attribute on your dropdown and start the progress bar by PF('pbAjax').start();
如果是这样,请在下拉菜单中添加
onChange
属性,并通过PF('pbAjax').start();
启动进度栏PF('pbAjax').start();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.