[richfaces-svn-commits] JBoss Rich Faces SVN: r5969 - in trunk/sandbox/samples/progressBarDemo: src/main/java/org/richfaces/sandbox/samples and 1 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Feb 8 20:14:31 EST 2008
Author: nbelaevski
Date: 2008-02-08 20:14:31 -0500 (Fri, 08 Feb 2008)
New Revision: 5969
Modified:
trunk/sandbox/samples/progressBarDemo/pom.xml
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
Log:
ComponentControl & ProgressBar integration
Modified: trunk/sandbox/samples/progressBarDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/pom.xml 2008-02-09 01:03:54 UTC (rev 5968)
+++ trunk/sandbox/samples/progressBarDemo/pom.xml 2008-02-09 01:14:31 UTC (rev 5969)
@@ -30,6 +30,12 @@
<version>3.2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>componentControl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
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-09 01:03:54 UTC (rev 5968)
+++ trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-02-09 01:14:31 UTC (rev 5969)
@@ -36,9 +36,10 @@
private boolean ajaxMode;
private Integer value = 0;
-
- public String action () {
- return null;
+
+ public String action () {
+ System.out.println("Bean.action()");
+ return null;
}
public String start() {
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-02-09 01:03:54 UTC (rev 5968)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-02-09 01:14:31 UTC (rev 5969)
@@ -2,6 +2,7 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/progressBar" prefix="progressBar" %>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/componentControl" prefix="cctrl" %>
<html>
<head>
<title></title>
@@ -47,7 +48,7 @@
mode="#{bean.modeString}"
progressVar="percent"
parameters="text:'crack'"
- style="width: 300px; height: 15px;"
+ style="width: 300px; height: 14px;"
action="#{bean.action}">
<f:facet name="initial">
<h:outputText value="Process not started"></h:outputText>
@@ -82,14 +83,23 @@
<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="$('_form:progrs').component.setValue(document.getElementById('percent').value);" />
+ <input type="button" id="ctrlValueButton" value="Set value by componentControl" />
+ <cctrl:componentControl attachTo="ctrlValueButton" for="progrs" event="click" disableDefault="true" operation="setValue">
+ <a4j:actionparam name="value" value="$F('percent')" noEscape="true" />
+ </cctrl:componentControl>
<br/>
- <input type="text" value="" id="label"/>
+
+ <input type="text" value="111" id="label"/>
<input type="button" value="Set label" onclick="$('_form:progrs').component.setLabel(document.getElementById('label').value);" />
+ <input type="button" id="ctrlLabelButton" value="Set label by componentControl" />
+ <cctrl:componentControl attachTo="ctrlLabelButton" for="progrs" event="click" disableDefault="true" operation="setLabel">
+ <a4j:actionparam name="label" value="$F('label')" noEscape="true" />
+ </cctrl:componentControl>
<br/>
<input type="button" value="Disable" onclick="$('_form:progrs').component.disable();" />
<br/>
<input type="button" value="Enable" onclick="$('_form:progrs').component.enable(event);" />
-
+ <br />
</f:view>
</body>
</html>
More information about the richfaces-svn-commits
mailing list