Author: andrei_exadel
Date: 2008-01-08 11:07:35 -0500 (Tue, 08 Jan 2008)
New Revision: 5184
Modified:
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml
Log:
Add client mode to progress bar component
Modified:
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
===================================================================
---
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-08
15:44:16 UTC (rev 5183)
+++
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-08
16:07:35 UTC (rev 5184)
@@ -22,6 +22,8 @@
package org.richfaces.sandbox.samples;
+import java.math.BigDecimal;
+import java.math.BigInteger;
import java.util.Date;
import javax.faces.event.ActionEvent;
@@ -50,7 +52,8 @@
* @return the value
*/
public Integer getValue() {
- return value ++;
+ //value = value.add(new BigDecimal(0.6));
+ return value++;
}
/**
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-08
15:44:16 UTC (rev 5183)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-08
16:07:35 UTC (rev 5184)
@@ -6,13 +6,18 @@
<head>
<title></title>
<style>
+ body{font-size : 11px}
.complete {
background-color: green;
- font-size: 9px;
+ color: white;
}
.remain {
background-color: #FCBBCD;
}
+ .main {
+ font-size: 12px;
+ font-weight: bold;
+ }
</style>
</head>
<body>
@@ -22,11 +27,11 @@
<h:form>
<progressBar:progressBar value="#{bean.value}"
enabled="#{bean.enabled}" id="progrs"
interval="500"
- style="width: 500px; height: 15px;"
+ reRender="per1"
+ styleClass="main"
determined="true"
- completeClass="complete"
- reRender="per1"
- reRenderAfterComplete="per2">
+ reRenderAfterComplete="per2"
+ mode="client">
<f:facet name="initial">
<h:outputText value="Process not started"></h:outputText>
</f:facet>
@@ -45,8 +50,12 @@
<a4j:support event="onclick"
reRender="progrs"></a4j:support>
</h:selectBooleanCheckbox>
</h:form>
-
-
+ <script>
+ var pr = new ProgressBar('j_id_jsp_2009877409_1:progrs');
+ </script>
+ <input type="button" value="crack"
onclick="alert(pr.getPercent());" /><br/>
+ <input type="text" value="" id="percent"/>
+ <input type="button" value="set"
onclick="pr.setPercent(document.getElementById('percent').value);"
/>
</f:view>
</body>
</html>
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml 2008-01-08
15:44:16 UTC (rev 5183)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml 2008-01-08
16:07:35 UTC (rev 5184)
@@ -13,7 +13,7 @@
<h:form>
<progressBar:progressBar value="#{bean.value}"
enabled="#{bean.enabled}" id="progrs"
interval="500"
- style="width: 300px; height: 15px;"
+ style="width: 300px; height: 20px;"
determined="true"
reRender="per1"
permanent="true"
Show replies by date