Author: ilya_shaikovsky
Date: 2010-05-30 06:51:31 -0400 (Sun, 30 May 2010)
New Revision: 17397
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/referencedusage.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/simple.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/viewusage.xhtml
Log:
status demos corrections.
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-30
10:36:54 UTC (rev 17396)
+++
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-30
10:51:31 UTC (rev 17397)
@@ -139,6 +139,10 @@
<name>a4j:status</name>
<samples>
<sample>
+ <id>viewusage</id>
+ <name>Common status for view</name>
+ </sample>
+ <sample>
<id>simple</id>
<name>Status Simple</name>
</sample>
@@ -146,10 +150,6 @@
<id>referencedusage</id>
<name>Referenced status</name>
</sample>
- <sample>
- <id>viewusage</id>
- <name>Common status for view</name>
- </sample>
</samples>
</demo>
<demo new="true">
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/referencedusage.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/referencedusage.xhtml 2010-05-30
10:36:54 UTC (rev 17396)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/referencedusage.xhtml 2010-05-30
10:51:31 UTC (rev 17397)
@@ -3,38 +3,41 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition>
- <p>
- Example of status which referenced from the components
- </p>
- <h:panelGrid columns="3" width="300px;">
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="User Details Panel" />
- </f:facet>
- <h:panelGrid columns="3">
- <h:outputText value="User name:" />
- <h:inputText value="#{userBean.name}" >
- <a4j:ajax status="nameStatus" event="keyup"/>
- </h:inputText>
- <a4j:status name="nameStatus">
- <f:facet name="start">
- <h:graphicImage value="/images/ai.gif"/>
- </f:facet>
- </a4j:status>
- <h:outputText value="Adress:" />
- <h:inputText value="#{userBean.address}">
- <a4j:ajax status="adressStatus" event="keyup"/>
- </h:inputText>
- <a4j:status name="adressStatus">
- <f:facet name="start">
- <h:graphicImage value="/images/ai.gif"/>
- </f:facet>
- </a4j:status>
- </h:panelGrid>
- </rich:panel>
- </h:panelGrid>
+ <p>Example of status which referenced from the components</p>
+ <p>There are two inputs with Ajax behaviors attached. And there are two statuses
which
+ are referenced from that behaviors. <b>status</b> attribute at Ajax tags
defined with
+ corresponding statuses <b>name</b> attributes values.</p>
+ <h:form>
+ <h:panelGrid columns="3" width="300px;">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="User Details Panel" />
+ </f:facet>
+ <h:panelGrid columns="3">
+ <h:outputText value="User name:" />
+ <h:inputText value="#{userBean.name}">
+ <a4j:ajax status="nameStatus" event="keyup" />
+ </h:inputText>
+ <a4j:status name="nameStatus">
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif" style="width:16px;
height:16px;"/>
+ </f:facet>
+ </a4j:status>
+ <h:outputText value="Adress:" />
+ <h:inputText value="#{userBean.address}">
+ <a4j:ajax status="adressStatus" event="keyup" />
+ </h:inputText>
+ <a4j:status name="adressStatus">
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif" style="width:16px;
height:16px;"/>
+ </f:facet>
+ </a4j:status>
+ </h:panelGrid>
+ </rich:panel>
+ </h:panelGrid>
+ </h:form>
</ui:composition>
</html>
\ No newline at end of file
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/simple.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/simple.xhtml 2010-05-30
10:36:54 UTC (rev 17396)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/simple.xhtml 2010-05-30
10:51:31 UTC (rev 17397)
@@ -1,41 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:rich="http://java.sun.com/jsf/composite/rich"
-
xmlns:a4j="http://richfaces.org/a4j">
-
- <ui:composition>
- <p>
- Example of form scoped status
- </p>
- <h:form>
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:rich="http://java.sun.com/jsf/composite/rich"
+
xmlns:a4j="http://richfaces.org/a4j">
+
+<ui:composition>
+ <p>Example of form scoped status. It's defined within a form and
+ handles all Ajax requests within this form</p>
+ <h:form>
<rich:panel id="psnel">
<f:facet name="header">
<h:outputText value="Panel with status" />
</f:facet>
<h:panelGrid columns="2">
- <h:panelGrid columns="2">
- <f:ajax event="keyup">
- <h:outputText value="User name:" />
- <h:inputText value="#{userBean.name}"/>
- <h:outputText value="Adress:" />
- <h:inputText value="#{userBean.address}"/>
- </f:ajax>
+ <h:panelGrid columns="2">
+ <a4j:ajax event="keyup">
+ <h:outputText value="User name:" />
+ <h:inputText value="#{userBean.name}" />
+ <h:outputText value="Adress:" />
+ <h:inputText value="#{userBean.address}" />
+ </a4j:ajax>
+ </h:panelGrid>
+ <a4j:status>
+ <f:facet name="start">
+ <h:graphicImage value="/images/ai.gif" />
+ </f:facet>
+ </a4j:status>
</h:panelGrid>
- <a4j:status>
- <f:facet name="start">
- <h:graphicImage value="/images/ai.gif"/>
- </f:facet>
- </a4j:status>
- </h:panelGrid>
- <h:commandButton value="Submit" type="button"
action="#{userBean.store}">
- <f:ajax render="out"/>
- </h:commandButton>
- <h:outputText value="#{userBean.recordStatus}" id="out"/>
+ <a4j:commandButton value="Submit" type="button"
+ action="#{userBean.store}" render="out" execute="@form"
/>
+ <h:outputText value="#{userBean.recordStatus}" id="out" />
</rich:panel>
- </h:form>
- </ui:composition>
-
+ </h:form>
+</ui:composition>
+
</html>
\ No newline at end of file
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/viewusage.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/viewusage.xhtml 2010-05-30
10:36:54 UTC (rev 17396)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/status/viewusage.xhtml 2010-05-30
10:51:31 UTC (rev 17397)
@@ -19,7 +19,8 @@
</ul>
</p>
<p>
- Example of View scoped status
+ Example of View scoped status. It should be defined outside of any form and will
+ handle all the Ajax requests within the view.
</p>
<h:panelGrid columns="3">
<h:form>
@@ -28,15 +29,15 @@
<h:outputText value="User Details Panel" />
</f:facet>
<h:panelGrid columns="2">
- <f:ajax event="keyup">
+ <a4j:ajax event="keyup">
<h:outputText value="User name:" />
<h:inputText value="#{userBean.name}"/>
<h:outputText value="Adress:" />
<h:inputText value="#{userBean.address}"/>
- </f:ajax>
+ </a4j:ajax>
</h:panelGrid>
<h:commandButton value="Submit" type="button"
action="#{userBean.store}">
- <f:ajax render="out"/>
+ <a4j:ajax render="out"/>
</h:commandButton>
<h:outputText value="#{userBean.recordStatus}" id="out"/>
</rich:panel>
@@ -47,11 +48,9 @@
<h:outputText value="Simple search panel" />
</f:facet>
<h:inputText value="Search..."/>
- <h:commandButton value="Submit" type="button">
- <f:ajax />
- </h:commandButton>
+ <a4j:commandButton value="Submit" type="button"/>
</rich:panel>
- </h:form>
+ </h:form>
<a4j:status>
<f:facet name="start">
<h:graphicImage value="/images/ai.gif"/>