[url]
o 1 exemplo vai de boa, ja no 2 nao deu certo, isso q baixei o css dele
.animated .ui-progressbar-value {
border:0px;
background-image: url("/imagens/pbar-ani.gif");
}
http://www.primefaces.org/showcase/ui/progressBar.jsf
[url]
[url]
o 1 exemplo vai de boa, ja no 2 nao deu certo, isso q baixei o css dele
.animated .ui-progressbar-value {
border:0px;
background-image: url("/imagens/pbar-ani.gif");
}
http://www.primefaces.org/showcase/ui/progressBar.jsf
[url]
alguem??
por favor um help ai!!num sei pq nao vai
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>LOCKBOX</title>
<link rel="stylesheet" type="text/css" href="css/css.css"/>
</h:head>
<f:view>
<h:body style="background-color: black">
<h:form>
<p:commandButton value="Start" type="button" onclick="pbAjax.start();startButton2.disable();" widgetVar="startButton2" />
<p:commandButton value="Cancel" actionListener="#{progressBean.cancel}" oncomplete="pbAjax.cancel();startButton2.enable();" />
<p:progressBar widgetVar="pbAjax" ajax="true" value="#{progressBean.progress}" labelTemplate="{value}%" styleClass="animated">
<p:ajax event="complete" listener="#{progressBean.onComplete}" oncomplete="startButton2.enable()"/>
</p:progressBar>
</h:form>
<script type="text/javascript">
function start() {
startButton1.disable();
window['progress'] = setInterval(function() {
var oldValue = pbClient.getValue(),
newValue = oldValue + 10;
pbClient.setValue(pbClient.getValue() + 10);
if(newValue == 100) {
clearInterval(window['progress']);
}
}, 1000);
}
function cancel() {
clearInterval(window['progress']);
pbClient.setValue(0);
startButton1.enable();
}
</script>
</h:body>
</f:view>
</html>
========================
// diretorio: tem em imagens ja a imagem!!
root {
display: block;
}
.animated .ui-progressbar-value {
border:0px;
background-image: url("/imagens/pbar-ani.gif");
}
============================
import java.io.Serializable;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
@ManagedBean(name = "progressBean")
public class ProgressBean implements Serializable {
private Integer progress;
public Integer getProgress() {
if(progress == null)
progress = 0;
else {
progress = progress + (int)(Math.random() * 35);
if(progress > 100)
progress = 100;
}
return progress;
}
public void setProgress(Integer progress) {
this.progress = progress;
}
public void onComplete() {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Progress Completed", "Progress Completed"));
}
public void cancel() {
progress = null;
}
}
alguma ajuda???