Author: nbelaevski
Date: 2008-01-14 15:13:38 -0500 (Mon, 14 Jan 2008)
New Revision: 5366
Modified:
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
Log:
Mode switching added
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
19:36:19 UTC (rev 5365)
+++
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-14
20:13:38 UTC (rev 5366)
@@ -33,6 +33,7 @@
private boolean enabled = false;
private boolean permanent = false;
private boolean determined = true;
+ private boolean ajaxMode;
private Integer value = 0;
@@ -90,7 +91,17 @@
public void setDetermined(boolean determined) {
this.determined = determined;
}
+
+ public boolean isAjaxMode() {
+ return ajaxMode;
+ }
+
+ public void setAjaxMode(boolean ajaxMode) {
+ this.ajaxMode = ajaxMode;
+ }
-
+ public String getModeString() {
+ return ajaxMode ? "ajax" : "client";
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-14
19:36:19 UTC (rev 5365)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-14
20:13:38 UTC (rev 5366)
@@ -36,7 +36,7 @@
permanent="#{bean.permanent}"
determined="#{bean.determined}"
reRenderAfterComplete="per2"
- mode="client">
+ mode="#{bean.modeString}">
<f:facet name="initial">
<h:outputText value="Process not started"></h:outputText>
</f:facet>
@@ -65,6 +65,12 @@
Determined: <h:selectBooleanCheckbox value="#{bean.determined}"
id="flag2">
<a4j:support event="onclick"
reRender="progrs"></a4j:support>
</h:selectBooleanCheckbox>
+ <f:verbatim><br /></f:verbatim>
+
+ Ajax mode: <h:selectBooleanCheckbox value="#{bean.ajaxMode}"
id="flag3">
+ <a4j:support event="onclick"
reRender="progrs"></a4j:support>
+ </h:selectBooleanCheckbox>
+ <f:verbatim><br /></f:verbatim>
</h:form>
<script>
var pr = new ProgressBar('j_id_jsp_2009877409_1:progrs');
Show replies by date