[richfaces-svn-commits] JBoss Rich Faces SVN: r5846 - in trunk/sandbox/samples/progressBarDemo/src/main: webapp/WEB-INF and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Feb 5 21:09:36 EST 2008


Author: nbelaevski
Date: 2008-02-05 21:09:36 -0500 (Tue, 05 Feb 2008)
New Revision: 5846

Modified:
   trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml
   trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
Log:
Latest updates for progressBar & demo

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-02-05 23:41:30 UTC (rev 5845)
+++ trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java	2008-02-06 02:09:36 UTC (rev 5846)
@@ -52,7 +52,7 @@
      */
     public Integer getValue() {
 	//value = value.add(new BigDecimal(0.6));
-	return value++;
+	return value;
     }
 
     /**
@@ -61,6 +61,10 @@
     public void setValue(Integer value) {
         this.value = value;
     }
+    
+    public Integer getIncValue() {
+    	return value++;
+    }
 
     /**
      * @return the enabled
@@ -103,5 +107,5 @@
     public String getModeString() {
     	return ajaxMode ? "ajax" : "client";
     }
-	
+    
 }
\ No newline at end of file

Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml	2008-02-05 23:41:30 UTC (rev 5845)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml	2008-02-06 02:09:36 UTC (rev 5846)
@@ -27,6 +27,10 @@
   <param-value>com.sun.facelets.FaceletViewHandler</param-value>
  </context-param>
 
+ <context-param>
+  <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+  <param-value>false</param-value>
+ </context-param>
  <!-- 
  --> 
  <filter>

Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp	2008-02-05 23:41:30 UTC (rev 5845)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp	2008-02-06 02:09:36 UTC (rev 5846)
@@ -27,16 +27,27 @@
            <h:selectOneRadio binding="#{skinBean.component}" />
            <h:commandLink action="#{skinBean.change}" value="set skin" />
 	</h:form>
+
+	<h:form>
+		<h:panelGrid columns="3">
+			<h:outputText value="Progress value: " />
+			<h:inputText value="#{bean.value}" />
+			
+			<h:commandButton value="Set" />
+		</h:panelGrid>
+	
+	</h:form>
 		
-	<h:form>
-	<progressBar:progressBar value="#{bean.value}" enabled="#{bean.enabled}" id="progrs"
+	<h:form id="_form">
+	
+	<progressBar:progressBar value="#{bean.incValue}" enabled="#{bean.enabled}" id="progrs"
 			interval="700" 
 			styleClass="main"
 			reRenderAfterComplete="per2"
 			mode="#{bean.modeString}"
 			progressVar="percent"
 			parameters="text:'crack'"
-			style="width: 300px; height: 14px"
+			style="width: 300px; height: 18px"
 			>
 		<f:facet name="initial">
 			<h:outputText value="Process not started"></h:outputText>
@@ -66,7 +77,7 @@
 	<f:verbatim><br /></f:verbatim>
 	</h:form>
 	<script>
-	var pr = new ProgressBar('j_id_jsp_2009877409_4:progrs');
+	var pr = $('_form:progrs').component;
 	</script>
 	<input type="button" value="Get value" onclick="alert(pr.getValue());" /><br/>
 	<input type="text" value="" id="percent"/>




More information about the richfaces-svn-commits mailing list