[richfaces-svn-commits] JBoss Rich Faces SVN: r5862 - 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
Wed Feb 6 07:28:21 EST 2008


Author: andrei_exadel
Date: 2008-02-06 07:28:21 -0500 (Wed, 06 Feb 2008)
New Revision: 5862

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:
fix problems

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-06 12:28:07 UTC (rev 5861)
+++ trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java	2008-02-06 12:28:21 UTC (rev 5862)
@@ -37,6 +37,10 @@
     
     private Integer value = 0;
     
+    public String action () {
+	return null;
+    }
+    
     public String start() {
 	this.enabled = true;
 	return null;

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-06 12:28:07 UTC (rev 5861)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/web.xml	2008-02-06 12:28:21 UTC (rev 5862)
@@ -26,11 +26,18 @@
   <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
   <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>
+ 
+ <context-param>
+  <param-name>org.ajax4jsf.COMPRESS_STYLE</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-06 12:28:07 UTC (rev 5861)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp	2008-02-06 12:28:21 UTC (rev 5862)
@@ -33,7 +33,7 @@
 			<h:outputText value="Progress value: " />
 			<h:inputText value="#{bean.value}" />
 			
-			<h:commandButton value="Set" />
+			<h:commandButton action="#{bean.action}" value="Set" />
 		</h:panelGrid>
 	
 	</h:form>
@@ -80,16 +80,16 @@
 	<script>
 	var pr = $('_form:progrs').component;
 	</script>
-	<input type="button" value="Get value" onclick="alert(pr.getValue());" /><br/>
+	<input type="button" value="Get value" onclick="alert($('_form:progrs').component.getValue());" /><br/>
 	<input type="text" value="" id="percent"/>
-	<input type="button" value="Set value" onclick="pr.setValue(document.getElementById('percent').value);" />
+	<input type="button" value="Set value" onclick="$('_form:progrs').component.setValue(document.getElementById('percent').value);" />
 	<br/>
 	<input type="text" value="" id="label"/>
-	<input type="button" value="Set label" onclick="pr.setLabel(document.getElementById('label').value);" />
+	<input type="button" value="Set label" onclick="$('_form:progrs').component.setLabel(document.getElementById('label').value);" />
 	<br/>
-	<input type="button" value="Disable" onclick="pr.disable();" />
+	<input type="button" value="Disable" onclick="$('_form:progrs').component.disable();" />
 	<br/>
-	<input type="button" value="Enable" onclick="pr.enable(event);" />
+	<input type="button" value="Enable" onclick="$('_form:progrs').component.enable(event);" />
 	
 	</f:view>
 	</body>	




More information about the richfaces-svn-commits mailing list