Author: nbelaevski
Date: 2008-01-14 12:00:00 -0500 (Mon, 14 Jan 2008)
New Revision: 5357
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/WEB-INF/faces-config.xml
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
Log:
Skin & component customization added to sample
Modified: trunk/sandbox/samples/progressBarDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/pom.xml 2008-01-14 16:59:06 UTC (rev 5356)
+++ trunk/sandbox/samples/progressBarDemo/pom.xml 2008-01-14 17:00:00 UTC (rev 5357)
@@ -29,5 +29,11 @@
<artifactId>progressBar</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
+
+ <dependency>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
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-14
16:59:06 UTC (rev 5356)
+++
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-14
17:00:00 UTC (rev 5357)
@@ -22,19 +22,17 @@
package org.richfaces.sandbox.samples;
-import java.math.BigDecimal;
-import java.math.BigInteger;
import java.util.Date;
-import javax.faces.event.ActionEvent;
-
/**
* @author $Autor$
*
*/
public class Bean {
- private Boolean enabled = false;
+ private boolean enabled = false;
+ private boolean permanent = false;
+ private boolean determined = true;
private Integer value = 0;
@@ -66,16 +64,32 @@
/**
* @return the enabled
*/
- public Boolean getEnabled() {
+ public boolean getEnabled() {
return enabled;
}
/**
* @param enabled the enabled to set
*/
- public void setEnabled(Boolean enabled) {
+ public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
+
+ public boolean isPermanent() {
+ return permanent;
+ }
+
+ public void setPermanent(boolean permanent) {
+ this.permanent = permanent;
+ }
+
+ public boolean isDetermined() {
+ return determined;
+ }
+
+ public void setDetermined(boolean determined) {
+ this.determined = determined;
+ }
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-01-14
16:59:06 UTC (rev 5356)
+++
trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-01-14
17:00:00 UTC (rev 5357)
@@ -18,4 +18,9 @@
<to-view-id>/faces/pages/index.jsp</to-view-id>
</navigation-case>
</navigation-rule>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
</faces-config>
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-14
16:59:06 UTC (rev 5356)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-14
17:00:00 UTC (rev 5357)
@@ -23,13 +23,18 @@
<body>
<f:view>
+ <h:form>
+ <h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set
skin" />
+ </h:form>
<h:form>
<progressBar:progressBar value="#{bean.value}"
enabled="#{bean.enabled}" id="progrs"
interval="500"
reRender="per1"
styleClass="main"
- determined="true"
+ permanent="#{bean.permanent}"
+ determined="#{bean.determined}"
reRenderAfterComplete="per2"
mode="client">
<f:facet name="initial">
@@ -49,6 +54,17 @@
Enabled: <h:selectBooleanCheckbox value="#{bean.enabled}"
id="flag">
<a4j:support event="onclick"
reRender="progrs"></a4j:support>
</h:selectBooleanCheckbox>
+
+ <f:verbatim><br /></f:verbatim>
+
+ Permanent: <h:selectBooleanCheckbox value="#{bean.permanent}"
id="flag1">
+ <a4j:support event="onclick"
reRender="progrs"></a4j:support>
+ </h:selectBooleanCheckbox>
+ <f:verbatim><br /></f:verbatim>
+
+ Determined: <h:selectBooleanCheckbox value="#{bean.determined}"
id="flag2">
+ <a4j:support event="onclick"
reRender="progrs"></a4j:support>
+ </h:selectBooleanCheckbox>
</h:form>
<script>
var pr = new ProgressBar('j_id_jsp_2009877409_1:progrs');
Show replies by date