Author: ilya_shaikovsky
Date: 2008-03-27 11:51:13 -0400 (Thu, 27 Mar 2008)
New Revision: 7309
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
Log:
progress bar demo explanation started
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2008-03-27
15:46:00 UTC (rev 7308)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2008-03-27
15:51:13 UTC (rev 7309)
@@ -31,11 +31,10 @@
<rich:menuItem submitMode="ajax" value="Save"
action="#{ddmenu.doSave}" icon="/images/icons/save.gif" />
<rich:menuItem submitMode="ajax" value="Save All"
- action="#{ddmenu.doSaveAll}" icon="" >
+ action="#{ddmenu.doSaveAll}">
<f:facet name="icon">
- <h:graphicImage value="richfaces/toolBar/images/icons/save_all.gif"
/>
+ <h:graphicImage value="/images/icons/save_all.gif" />
</f:facet>
-
</rich:menuItem>
</rich:menuGroup>
<rich:menuItem submitMode="ajax" value="Close"
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml 2008-03-27
15:46:00 UTC (rev 7308)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/examples/polling.xhtml 2008-03-27
15:51:13 UTC (rev 7309)
@@ -1,26 +1,29 @@
-<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
-
- <h:form>
- <h:outputText
value="http://jira.jboss.com/jira/browse/RF-2364"/>
- <a4j:outputPanel id="progressPanel">
- <br/>
- <a4j:commandButton action="#{progressBarBean.startProcess}"
value="startProcess" reRender="progressPanel" rendered="#{not
progressBarBean.enabled}" style="margin: 9px 0px 5px;"/>
- <rich:progressBar value="#{progressBarBean.currentValue}"
interval="2000"
- label="#{progressBarBean.currentValue} %"
enabled="#{progressBarBean.enabled}">
- <f:facet name="initial">
- <br/>
- <h:outputText value="Process doesn't started yet"/>
- </f:facet>
- <f:facet name="complete">
- <br/>
- <h:outputText value="Process Done"/>
- </f:facet>
- </rich:progressBar>
- </a4j:outputPanel>
- </h:form>
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <h:form>
+ <a4j:outputPanel id="progressPanel">
+ <br />
+ <a4j:commandButton action="#{progressBarBean.startProcess}"
+ value="startProcess" reRender="progressPanel"
+ rendered="#{not progressBarBean.enabled}"
+ style="margin: 9px 0px 5px;" />
+ <rich:progressBar value="#{progressBarBean.currentValue}"
+ interval="2000" label="#{progressBarBean.currentValue} %"
+ enabled="#{progressBarBean.enabled}" minValue="-1"
maxValue="100">
+ <f:facet name="initial">
+ <br />
+ <h:outputText value="Process doesn't started yet" />
+ </f:facet>
+ <f:facet name="complete">
+ <br />
+ <h:outputText value="Process Done" />
+ </f:facet>
+ </rich:progressBar>
+ </a4j:outputPanel>
+ </h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml 2008-03-27
15:46:00 UTC (rev 7308)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/progressBar/usage.xhtml 2008-03-27
15:51:13 UTC (rev 7309)
@@ -7,10 +7,17 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>
- SHORT DESCRIPTION
+ <p><b>
+ rich:progressBar</b> is a component which could be used to display progress
of
+ any client or server side process.
+ </p>
+
+ <p>
+ In order to display progress of some server side
process(<b>mode="ajax"</b>) component
+ uses polling method. It just polls server to get the <b>value </b>which
should be
+ updated by server side process.
</p>
-
+ <p>Next simple example shows you progress bar which polls server every two
second to get new progress value</p>
<fieldset class="demo_fieldset">
<legend class="demo_legend">Server Side</legend>
<div class="sample-container" >
@@ -19,8 +26,26 @@
<ui:param name="sourcepath"
value="/richfaces/progressBar/examples/polling.xhtml"/>
</ui:include>
</div>
- </fieldset>
-
+ </fieldset>
+ <p>
+ In order to customize progressBar next main attributes used:
+ </p>
+ <ul>
+ <li><b>minValue, maxValue</b> - defines boundary values for
progress bar</li>
+ <li><b>value</b> - value binding to property which kept process
progress</li>
+ <li><b>enabled</b> - boolean attribute. If false progress stops
polling</li>
+ </ul>
+ <p>
+ Also next two facets could be defined for states customization:
+ </p>
+ <ul>
+ <li><b>initial</b> rendered before progress started</li>
+ <li><b>complete</b> rendered after process complete</li>
+ </ul>
+ <p>
+ Next example shows client side progress bar. Progress Bar JS API should be
+ used to update progress value from client side process.
+ </p>
<fieldset class="demo_fieldset">
<legend class="demo_legend">Client Side</legend>
<div class="sample-container" >
@@ -29,7 +54,17 @@
<ui:param name="sourcepath"
value="/richfaces/progressBar/examples/client.xhtml"/>
</ui:include>
</div>
- </fieldset>
+ </fieldset>
+ <p>
+ Next JS API functions should be used to update progress:
+ </p>
+ <ul>
+ <li><b>enable()</b> </li>
+ <li><b>disable()</b> </li>
+ <li><b>setValue(newValue)</b> </li>
+ <li><b>setLabel(newLabel)</b> </li>
+ </ul>
+
</ui:define>
</ui:composition>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-03-27
15:46:00 UTC (rev 7308)
+++
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-03-27
15:51:13 UTC (rev 7309)
@@ -7,7 +7,7 @@
<ui:composition>
<rich:panel styleClass="panel_menu">
-<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}"
width="100%">
+<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}"
width="100%" height="605px">
<rich:panelBarItem id="ajaxSupport" label="Ajax Support">
<ui:include src="/templates/include/components-group.xhtml" >
<ui:param name="components"
value="#{componentNavigator.ajaxSupport}" />