Author: SergeySmirnov
Date: 2007-08-10 18:31:19 -0400 (Fri, 10 Aug 2007)
New Revision: 2209
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/assignTo.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/changeSkin.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/screenSize.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/examples/sayHello.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/examples/sayHello.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/examples/ajaxSubmit.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/examples/simplePanel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintData.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/headlessPanel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/lookCustom.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/nestedPanels.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/simplePanel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/examples/clock.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/selfRender.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/validationErrorIssue.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/examples/manually.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/examples/variants.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/basic.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/difftypes.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/cleaner.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/pictured.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/echo.xhtml
Removed:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/source/
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/look-customization.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
Log:
samples are added
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/assignTo.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/assignTo.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/assignTo.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,21 @@
+<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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+
+<h:form>
+ <rich:panel>
+ <a4j:commandButton value="Set Name to Alex" reRender="rep"
>
+ <a4j:actionparam name="username" value="Alex"
assignTo="#{userBean.name}"/>
+ </a4j:commandButton>
+ <rich:spacer width="20" />
+ <a4j:commandButton value="Set Name to John" reRender="rep"
>
+ <a4j:actionparam name="username" value="John"
assignTo="#{userBean.name}"/>
+ </a4j:commandButton>
+ </rich:panel>
+ <rich:panel>
+ <h:outputText id="rep" value="Selected
Name:#{userBean.name}"/>
+ </rich:panel>
+</h:form>
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/changeSkin.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/changeSkin.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/changeSkin.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,21 @@
+<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.ajax4jsf.org/rich">
+ <h:form>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Change Demo Appplication Skin To: "/>
+ </f:facet>
+ <h:commandLink value="DeepMarine">
+ <a4j:actionparam name="skin" value="deepMarine"
assignTo="#{skinBean.skin}"/>
+ </h:commandLink>
+ <rich:spacer width="20" />
+ <h:commandLink value="BlueSky" >
+ <a4j:actionparam name="skin" value="blueSky"
assignTo="#{skinBean.skin}"/>
+ </h:commandLink>
+ </rich:panel>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/screenSize.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/screenSize.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/examples/screenSize.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,24 @@
+<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.ajax4jsf.org/rich">
+ <h:form>
+ <a4j:commandButton value="Show Screen Size"
reRender="infoPanel">
+ <a4j:actionparam name="w" value="screen.width"
+ assignTo="#{userBean.screenWidth}" noEscape="true" />
+ <a4j:actionparam name="h" value="screen.height"
+ assignTo="#{userBean.screenHeight}" noEscape="true" />
+ </a4j:commandButton>
+
+ <rich:panel id="infoPanel">
+ <h:panelGrid columns="2">
+ <h:outputText value="Width:" />
+ <h:outputText value="#{userBean.screenWidth}"/>
+ <h:outputText value="Height:" />
+ <h:outputText value="#{userBean.screenHeight}"/>
+ </h:panelGrid>
+ </rich:panel>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/actionparam/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -19,25 +19,10 @@
directly using the assignTo attribute.
</p>
<div class="sample-container">
- <h:form>
- <rich:panel>
- <a4j:commandButton value="Set Name to Alex" reRender="rep"
>
- <a4j:actionparam name="username" value="Alex"
assignTo="#{userBean.name}"/>
- </a4j:commandButton>
- <rich:spacer width="20" />
- <a4j:commandButton value="Set Name to John" reRender="rep"
>
- <a4j:actionparam name="username" value="John"
assignTo="#{userBean.name}"/>
- </a4j:commandButton>
- </rich:panel>
- <rich:panel>
- <h:outputText id="rep" value="Selected
Name:#{userBean.name}"/>
- </rich:panel>
- </h:form>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/actionparam/source/assignTo.xhtml"/>
- </ui:include>
-
-
+ <ui:include src="/richfaces/actionparam/examples/assignTo.xhtml" />
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/actionparam/examples/assignTo.xhtml"/>
+ </ui:include>
</div>
<p>
You can use a4j:param not only with ajax components, but with non-ajax command
component also.
@@ -46,22 +31,10 @@
invoking even a single line of java code on the server side.
</p>
<div class="sample-container">
- <h:form>
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Change Demo Appplication Skin To: "/>
- </f:facet>
- <h:commandLink value="DeepMarine">
- <a4j:actionparam name="skin" value="deepMarine"
assignTo="#{skinBean.skin}"/>
- </h:commandLink>
- <rich:spacer width="20" />
- <h:commandLink value="BlueSky" >
- <a4j:actionparam name="skin" value="blueSky"
assignTo="#{skinBean.skin}"/>
- </h:commandLink>
- </rich:panel>
- </h:form>
+
+ <ui:include src="/richfaces/actionparam/examples/changeSkin.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/actionparam/source/changeSkin.xhtml"/>
+ <ui:param name="sourcepath"
value="/richfaces/actionparam/examples/changeSkin.xhtml"/>
</ui:include>
</div>
@@ -78,28 +51,14 @@
the backing bean with browser screen size values.
</p>
<div class="sample-container">
- <h:form>
- <a4j:commandButton value="Show Screen Size"
reRender="infoPanel">
- <a4j:actionparam name="w" value="screen.width"
- assignTo="#{userBean.screenWidth}" noEscape="true" />
- <a4j:actionparam name="h" value="screen.height"
- assignTo="#{userBean.screenHeight}" noEscape="true" />
- </a4j:commandButton>
-
- <rich:panel id="infoPanel">
- <h:panelGrid columns="2">
- <h:outputText value="Width:" />
- <h:outputText value="#{userBean.screenWidth}"/>
- <h:outputText value="Height:" />
- <h:outputText value="#{userBean.screenHeight}"/>
- </h:panelGrid>
- </rich:panel>
- </h:form>
+ <ui:include src="/richfaces/actionparam/examples/screenSize.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/actionparam/examples/screenSize.xhtml"/>
+ </ui:include>
</div>
+
+
</ui:define>
- <ui:define name="sources">
- Here is a part of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/actionparam/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/examples/sayHello.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/examples/sayHello.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/examples/sayHello.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,24 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1" />
+
+ <a4j:form>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" />
+ <a4j:commandButton value="Say Hello" reRender="out" />
+ </h:panelGrid>
+ </a4j:form>
+ <h:panelGroup id="out">
+ <h:outputText value="Hello " rendered="#{not empty
userBean.name}" />
+ <h:outputText value="#{userBean.name}" />
+ <h:outputText value="!" rendered="#{not empty userBean.name}"
/>
+ </h:panelGroup>
+
+ <rich:separator height="1" style="padding-top:10px" />
+</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -21,22 +21,12 @@
</p>
<div class="sample-container" >
- <rich:separator height="1" />
-
- <a4j:form>
- <h:panelGrid columns="3">
- <h:outputText value="Name:" />
- <h:inputText value="#{userBean.name}" />
- <a4j:commandButton value="Say Hello" reRender="out" />
- </h:panelGrid>
- </a4j:form>
- <h:panelGroup id="out">
- <h:outputText value="Hello " rendered="#{not empty
userBean.name}" />
- <h:outputText value="#{userBean.name}" />
- <h:outputText value="!" rendered="#{not empty
userBean.name}" />
- </h:panelGroup>
-
- <rich:separator height="1" style="padding-top:10px" />
+
+ <ui:include src="/richfaces/commandButton/examples/sayHello.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/commandButton/examples/sayHello.xhtml"/>
+ </ui:include>
+
</div>
<p>
For additional information about attributes of this compponent read
@@ -46,9 +36,6 @@
</p>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/commandButton/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/examples/sayHello.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/examples/sayHello.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/examples/sayHello.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,26 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1" />
+
+ <a4j:form>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" />
+ <a4j:commandLink reRender="out">
+ <h:outputText value="Say Hello" />
+ </a4j:commandLink>
+ </h:panelGrid>
+ </a4j:form>
+ <h:panelGroup id="out">
+ <h:outputText value="Hello " rendered="#{not empty
userBean.name}" />
+ <h:outputText value="#{userBean.name}" />
+ <h:outputText value="!" rendered="#{not empty userBean.name}"
/>
+ </h:panelGroup>
+
+ <rich:separator height="1" style="padding-top:10px" />
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -21,24 +21,11 @@
</p>
<div class="sample-container" >
- <rich:separator height="1" />
-
- <a4j:form>
- <h:panelGrid columns="3">
- <h:outputText value="Name:" />
- <h:inputText value="#{userBean.name}" />
- <a4j:commandLink reRender="out">
- <h:outputText value="Say Hello" />
- </a4j:commandLink>
- </h:panelGrid>
- </a4j:form>
- <h:panelGroup id="out">
- <h:outputText value="Hello " rendered="#{not empty
userBean.name}" />
- <h:outputText value="#{userBean.name}" />
- <h:outputText value="!" rendered="#{not empty
userBean.name}" />
- </h:panelGroup>
-
- <rich:separator height="1" style="padding-top:10px" />
+
+ <ui:include src="/richfaces/commandLink/examples/sayHello.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/commandLink/examples/sayHello.xhtml"/>
+ </ui:include>
</div>
<p>
For additional information about attributes of this compponent read
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/examples/ajaxSubmit.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/examples/ajaxSubmit.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/examples/ajaxSubmit.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,37 @@
+<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.ajax4jsf.org/rich">
+
+ <h:panelGrid columns="2">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Form with ajaxSubmit equals true"/>
+ </f:facet>
+
+ <a4j:form ajaxSubmit="true" reRender="name">
+ <h:panelGrid>
+ <h:commandButton value="Set Local Name to John (Ajax)"
action="#{userBean.nameItJohn}" />
+ <h:outputText id="name" value="Name:#{userBean.name}" />
+ </h:panelGrid>
+ </a4j:form>
+ </rich:panel>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Form with ajaxSubmit equals false"/>
+ </f:facet>
+
+ <a4j:form>
+ <h:panelGrid>
+ <h:commandButton value="Set Both Name to Mark (non-Ajax)"
action="#{userBean.nameItMark}" />
+ <h:outputText id="name" value="Name:#{userBean.name}" />
+ </h:panelGrid>
+ </a4j:form>
+
+ </rich:panel>
+
+ </h:panelGrid>
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,13 @@
+ ....
+ <-- This code does not work correctly after the link is re-rendered -->
+ <h:form>
+ ....
+ <a4j:commandButton value="Update Non-Ajax Link"
reRender="panel" />
+ ....
+ <h:panelGrid id="panel">
+ ....
+ <h:commandLink value="Non-Ajax Submit" action="foo" />
+ ....
+ </h:panelGrid>
+ ....
+ </h:form>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -29,21 +29,10 @@
you point to it with reRender, the wrong code is generated that causes the broken
functionality
when user clicks this link later. The example of problematic code is below. To fix the
code,
you need to replace h:form with a4j:form and h:commandLink with a4j:htmlCommandLink.
- <pre>
- ....
- <-- This code does not work correctly -->
- <h:form>
- ....
- <a4j:commandButton value="Update Non-Ajax Link"
reRender="panel" />
- ....
- <h:panelGrid id="panel">
- ....
- <h:commandLink value="Non-Ajax Submit" action="foo"
/>
- ....
- </h:panelGrid>
- ....
- </h:form>
- </pre>
+
+ <rich:insert src="/richfaces/form/snippets/commandLinkProblem.xhtml"
highlight="xhtml"/>
+
+
</p>
<p>
When ajaxSubmit="true", all standard action components on this form become
ajaxable. This
@@ -54,36 +43,12 @@
</p>
<div class="sample-container" >
- <h:panelGrid columns="2">
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Form with ajaxSubmit equals true"/>
- </f:facet>
-
- <a4j:form ajaxSubmit="true" reRender="name">
- <h:panelGrid>
- <h:commandButton value="Set Local Name to John (Ajax)"
action="#{userBean.nameItJohn}" />
- <h:outputText id="name" value="Name:#{userBean.name}"
/>
- </h:panelGrid>
- </a4j:form>
- </rich:panel>
-
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Form with ajaxSubmit equals false"/>
- </f:facet>
-
- <a4j:form>
- <h:panelGrid>
- <h:commandButton value="Set Both Name to Mark (non-Ajax)"
action="#{userBean.nameItMark}" />
- <h:outputText id="name" value="Name:#{userBean.name}"
/>
- </h:panelGrid>
- </a4j:form>
-
- </rich:panel>
-
- </h:panelGrid>
+ <ui:include src="/richfaces/form/examples/ajaxSubmit.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/form/examples/ajaxSubmit.xhtml"/>
+ </ui:include>
+
</div>
<p>
@@ -98,9 +63,6 @@
</h:outputLink>.
</p>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/form/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/examples/hoverEcho.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +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.ajax4jsf.org/rich">
+
+ <rich:separator lineType="solid" height="1" />
+ <table width="400">
+ <tbody>
+ <tr>
+ <td onmouseover="updateName('Alex')"
onmouseout="updateName('')" > Alex</td>
+ <td onmouseover="updateName('Jonh')"
onmouseout="updateName('')" > Jonh</td>
+ <td onmouseover="updateName('Roger')"
onmouseout="updateName('')" > Roger</td>
+ </tr>
+ <tr>
+ <td colspan="3"><h:outputText id="showname"
value="Name: #{userBean.name}" /></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <a4j:form>
+ <a4j:jsFunction name="updateName" reRender="showname">
+ <a4j:actionparam name="param1"
assignTo="#{userBean.name}" />
+ </a4j:jsFunction>
+ </a4j:form>
+
+ <rich:separator height="1" style="padding-top:10px" />
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -16,28 +16,13 @@
<div class="sample-container" >
- <rich:separator lineType="solid" height="1" />
- <table width="400">
- <tbody>
- <tr>
- <td onmouseover="updateName('Alex')"
onmouseout="updateName('')" > Alex</td>
- <td onmouseover="updateName('Jonh')"
onmouseout="updateName('')" > Jonh</td>
- <td onmouseover="updateName('Roger')"
onmouseout="updateName('')" > Roger</td>
- </tr>
- <tr>
- <td colspan="3"><h:outputText id="showname"
value="Name: #{userBean.name}" /></td>
- </tr>
- </tbody>
- </table>
- <a4j:form>
- <a4j:jsFunction name="updateName" reRender="showname">
- <a4j:actionparam name="param1"
assignTo="#{userBean.name}" />
- </a4j:jsFunction>
- </a4j:form>
-
- <rich:separator height="1" style="padding-top:10px" />
+ <ui:include src="/richfaces/jsFunction/examples/hoverEcho.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/jsFunction/examples/hoverEcho.xhtml"/>
+ </ui:include>
</div>
+
<p>
<b>name</b> attribute defines the name of the function that will be
generated. You
can use it as a regular Javascript function name to invoke. a4j:actionparam
@@ -59,9 +44,6 @@
</h:outputLink>.
</p>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/jsFunction/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/examples/simplePanel.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/examples/simplePanel.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/examples/simplePanel.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,36 @@
+<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.ajax4jsf.org/rich">
+
+ <script>
+ function getRightTop(ref) {
+ var position = new Object();
+ position.top = 0; //ref.offsetTop;
+ position.left =0; // ref.offsetLeft+ref.clientWidth+6;
+ return position;
+ }
+ </script>
+ <rich:modalPanel id="mp" minHeight="200"
minWidth="450"
+ height="200" width="500" zindex="2000">
+ <f:facet name="header">
+ <h:outputText value="Modal Panel Title" />
+ </f:facet>
+ <f:facet name="controls">
+ <h:graphicImage value="/images/modal/close.png"
style="cursor:pointer"
onclick="Richfaces.hideModalPanel('mp')" />
+ </f:facet>
+ <p>Any JSF content might be inside the panel. In case of using
+ Facelets or JSF 1.2, it might be any mixed content.</p>
+
+ <p>The RichFaces modal panel is good with <a4j:include> to
create
+ a wizard like behavior.</p>
+ <p>The model panel is open and closed from the javascript function
+ on <i>Richfaces</i> object. The following code
+ <a href="javascript:Richfaces.hideModalPanel('mp')">hide this
panel</a>:
+ Richfaces.hideModalPanel('mp')</p>
+
+ </rich:modalPanel>
+
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -7,53 +7,31 @@
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
-<script>
- function getRightTop(ref) {
- var position = new Object();
- position.top = 0; //ref.offsetTop;
- position.left =0; // ref.offsetLeft+ref.clientWidth+6;
- return position;
- }
-</script>
+
<p>RichFaces Modal Panel is a container that blocks the operation on the base
page when the modal
panel is shown.</p>
<p>You can show the modal panel using the folowing javascript function:
Richfaces.hideModalPanel(id, params).
- For example, <a
href="javascript:Richfaces.showModalPanel('mp',{width:450,
top:200})">
+ For example, this line code invoke the modal panel:
+ <a href="javascript:Richfaces.showModalPanel('mp',{width:450,
top:200})">
Richfaces.showModalPanel('mp',{width:450, top:200})</a></p>
<div class="sample-container">
-
-
- <rich:modalPanel id="mp" minHeight="200"
minWidth="450"
- height="200" width="500" zindex="2000">
- <f:facet name="header">
- <h:outputText value="Modal Panel Title" />
- </f:facet>
- <f:facet name="controls">
- <h:graphicImage value="/images/modal/close.png"
style="cursor:pointer"
onclick="Richfaces.hideModalPanel('mp')" />
- </f:facet>
- <p>Any JSF content might be inside the panel. In case of using
- Facelets or JSF 1.2, it might be any mixed content.</p>
-
- <p>The RichFaces modal panel is good with <a4j:include> to
create
- a wizard like behavior.</p>
- <p>The model panel is open and closed from the javascript function
- on <i>Richfaces</i> object. The following code
- <a href="javascript:Richfaces.hideModalPanel('mp')">hide this
panel</a>:
- Richfaces.hideModalPanel('mp')</p>
-
- </rich:modalPanel>
-
-
-
+
+ <ui:include src="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
+
</div>
+ <p>The modal panel has absolute layout. Absolutly, no reason to put in on the
page
+ where it is called. If modal panel has a form element, it should have it own form.
+ In this case, it must be declired outside of the other form on the same page.
+ I.e. nested form are not allowed.<br/>
+ Those requirements are apply because due to the bug of earlier Interner Expolrer
versions,
+ the dialog are moved to the top of the browser DOM tree just after it is
rendered.</p>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
- src="${facesContext.externalContext.requestContextPath}/richfaces/modalPanel/source/usage.html"
- class="source_frame" />
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintBean.java
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintBean.java 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,38 @@
+package org.richfaces.demo.paint2d;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+
+public class PaintBean {
+
+ private int fontSize;
+
+ public void paint(Graphics2D g2d, Object obj) {
+
+ PaintData data = (PaintData) obj;
+
+ int testLenght = data.text.length();
+ fontSize = testLenght < 8? 40 : 40 - (testLenght - 8);
+ if (fontSize < 12)fontSize = 12;
+ Font font = new Font("Serif", Font.HANGING_BASELINE, fontSize);
+ g2d.setFont(font);
+
+ int x = 10;
+ int y = fontSize*5/2;
+ g2d.translate(x, y);
+ Color color = new Color(data.color );
+
+ g2d.setPaint(new Color(color.getRed(),color.getGreen(), color.getBlue(), 30));
+ AffineTransform origTransform = g2d.getTransform();
+ g2d.shear(-0.5*data.scale, 0);
+ g2d.scale(1, data.scale);
+ g2d.drawString(data.text, 0, 0);
+
+ g2d.setTransform(origTransform);
+ g2d.setPaint(color);
+ g2d.drawString(data.text, 0, 0);
+ }
+}
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintData.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintData.java
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/PaintData.java 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,28 @@
+package org.richfaces.demo.paint2d;
+
+import java.io.Serializable;
+
+public class PaintData implements Serializable{
+ String text;
+ int color;
+ float scale;
+ public int getColor() {
+ return color;
+ }
+ public void setColor(int color) {
+ this.color = color;
+ }
+ public float getScale() {
+ return scale;
+ }
+ public void setScale(float scale) {
+ this.scale = scale;
+ }
+
+ public String getText() {
+ return text;
+ }
+ public void setText(String text) {
+ this.text = text;
+ }
+}
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,52 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1" style="padding:10px 0" />
+
+ <h:form>
+
+ <h:panelGrid columns="3" width="100%">
+
+ <h:inputText value="#{paintData.text}">
+ <a4j:support event="onkeyup" reRender=":painter" />
+ </h:inputText>
+
+ <h:panelGroup>
+ Color:
+ <rich:inputNumberSlider showInput="false"
+ showBoundaryValues="false" showToolTip="false"
+ value="#{paintData.color}" step="255" minValue="0"
+ maxValue="16000000">
+ <a4j:support event="onchange" reRender=":painter" />
+ <f:convertNumber />
+ </rich:inputNumberSlider>
+
+ </h:panelGroup>
+
+
+ <h:panelGroup>
+ Shadow:
+
+ <rich:inputNumberSlider showInput="false"
+ showBoundaryValues="false" showToolTip="false"
+ value="#{paintData.scale}" step="0.5" minValue="0"
maxValue="3">
+ <a4j:support event="onchange" reRender=":painter" />
+ <f:convertNumber />
+ </rich:inputNumberSlider>
+
+ </h:panelGroup>
+
+
+ </h:panelGrid>
+ </h:form>
+ <rich:paint2D id="painter" width="300" height="120"
+ data="#{paintData}" format="png"
paint="#{paintBean.paint}" />
+
+ <rich:separator height="1" style="padding:10px 0" />
+
+
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -21,52 +21,30 @@
traffic over the net, a generated image will be cached if the data
is not changed. You can turn this feature of with a cacheable attribute.</p>
<div class="sample-container">
- <h:form>
- <h:panelGrid columns="3" width="100%">
+ <ui:include src="/richfaces/paint2D/examples/painter.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/paint2D/examples/painter.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
- <h:inputText value="#{paintData.text}">
- <a4j:support event="onkeyup" reRender=":painter" />
- </h:inputText>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/paint2D/examples/PaintBean.java"/>
+ <ui:param name="openlabel" value="View PaintBean.java Source"
/>
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
- <h:panelGroup>
- Color:
- <rich:inputNumberSlider showInput="false"
- showBoundaryValues="false" showToolTip="false"
- value="#{paintData.color}" step="255" minValue="0"
- maxValue="16000000">
- <a4j:support event="onchange" reRender=":painter" />
- <f:convertNumber />
- </rich:inputNumberSlider>
- </h:panelGroup>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/paint2D/examples/PaintData.java"/>
+ <ui:param name="openlabel" value="View PaintData.java Source"
/>
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
-
- <h:panelGroup>
- Shadow:
-
- <rich:inputNumberSlider showInput="false"
- showBoundaryValues="false" showToolTip="false"
- value="#{paintData.scale}" step="0.5" minValue="0"
maxValue="3">
- <a4j:support event="onchange" reRender=":painter" />
- <f:convertNumber />
- </rich:inputNumberSlider>
-
- </h:panelGroup>
-
-
- </h:panelGrid>
- </h:form>
- <rich:paint2D id="painter" width="300" height="120"
- data="#{paintData}" format="png"
paint="#{paintBean.paint}" />
+
</div>
</ui:define>
- <ui:define name="sources">
- Here is fragment of page sources for given example:
- <iframe
- src="${facesContext.externalContext.requestContextPath}/richfaces/paint2D/source/usage.html"
- class="source_frame" />
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/headlessPanel.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/headlessPanel.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/headlessPanel.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,15 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:panel>
+ RichFaces is a library for adding rich user interface features to JSF
+ applications. It extends the Ajax4jsf framework to include a large
+ (and growing) set of powerful rich AJAX-enabled components that come
+ with extensive skins support.
+ </rich:panel>
+
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/lookCustom.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/lookCustom.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/lookCustom.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,97 @@
+<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.ajax4jsf.org/rich">
+
+ <style>
+ .rich-panel-header {
+ color:#0054BD;
+ }
+ .panel {
+ vertical-align:top;
+ }
+ .top {
+ width:200px;height:100px;
+ }
+
+ .head2 {
+ background-image : url();
+ background-color : #4C9600;
+ height:18px;
+ text-align:center;
+ vertical-align:middle;
+ color:#CFF;
+ padding:4px 0;
+ }
+
+ .body3 {
+ height:100px;
+ overflow:auto;
+ }
+ </style>
+ <h:panelGrid columnClasses="panel" border="0"
columns="2">
+ <rich:panel>
+ <f:facet name="header">
+ Panel #1. Changing Style Synchronously
+ </f:facet>
+ Each component in the RichFaces has a pre-defined set of classes you can manipulate
with. If defined, those
+ classes overwrite the ones come from the skin.
+ </rich:panel>
+
+ <rich:panel>
+ <f:facet name="header">
+ Panel #2. Changing Style Synchronously
+ </f:facet>
+ In this example, we define header color using the .rich-panel-header class and all
panels located on the same page
+ inherit this color
+ </rich:panel>
+
+ </h:panelGrid>
+
+ <h:panelGrid columnClasses="panel" border="0"
columns="3">
+ <rich:panel
+ onmouseover="document.getElementById(this.id+'_header').style.background='#60BA01';document.getElementById(this.id+'_body').style.background='#F4FFF8'"
+ onmouseout="document.getElementById(this.id+'_header').style.background='#4C9600';document.getElementById(this.id+'_body').style.background='#E4FFC8'"
+ style="width:200px;" headerClass="head2"
bodyClass="body3">
+ <f:facet name="header">
+ Panel header
+ </f:facet>
+ Base on the previous layout, but some javascript behaviour added.
+ </rich:panel>
+
+ <rich:panel style="width:200px;" bodyClass="body3">
+ <f:facet name="header">
+ Scrolling Text Panel
+ </f:facet>
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ </rich:panel>
+
+ <rich:panel styleClass="top">
+ This is a panel without the header
+ </rich:panel>
+
+ <rich:panel style="position: absolute; top: 400px; right: 100px; "
styleClass="top">
+ <f:facet name="header">
+ Panel header
+ </f:facet>
+ This is a panel with absolute position on the screen.<br/>
+ Resize the browser's window to see the result.
+ </rich:panel>
+
+ </h:panelGrid>
+
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/nestedPanels.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/nestedPanels.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/nestedPanels.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,44 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:panel style="padding:0" headerClass="outpanelHeader">
+ <f:facet name="header">
+ <rich:spacer height="4" />
+ </f:facet>
+ <h2 align="center"><h:outputText value="Benefits of Using
Ajax4jsf" /></h2>
+ <h:panelGrid columns="2" columnClasses="gridContent">
+ <rich:panel bodyClass="inpanelBody">
+ <f:facet name="header">
+ For Application Developers
+ </f:facet>
+ For Application Developers
+ <ul>
+ <li>Production quality Open Source</li>
+ <li>Does Open Source and has an Open Architecture</li>
+ <li>Compatible with any JSF Implementation - MyFaces, JSF1.1,
JSF1.2</li>
+ <li>Allows to Ajaxify JSF application without writing Javascript</li>
+ <li>Works with standard and third party components</li>
+ <li>Adds the Ajax capability to existing non-Ajax components</li>
+ </ul>
+ </rich:panel>
+ <rich:panel bodyClass="inpanelBody">
+ <f:facet name="header" >
+ For Component Developers
+ </f:facet>
+ <ul>
+ <li>Ajax4jsf is Open Source and has an Open Architecture</li>
+ <li>Gives an API to create components with built-in Ajax support</li>
+ <li>Has a Component Development Kit for rapid development</li>
+ <li>Allows to skin the look-n-feel using both CSS and set of
skin-parameters</li>
+ <li>Automatically generates the unit test-cases for developing
components</li>
+ <li>Allows to pack javascript code, images, css inside the final
jar</li>
+ </ul>
+ </rich:panel>
+ </h:panelGrid>
+ </rich:panel>
+
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/simplePanel.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/simplePanel.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/examples/simplePanel.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,21 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:panel>
+ <f:facet name="header">
+ Write your own custom rich components with built-in AJAX support
+ </f:facet>
+ The CDK includes a code-generation facility and a
+ templating facility using a JSP-like syntax. These capabilities help
+ to avoid a routine process of a component creation. The component factory
+ works like a well-oiled machine allowing the creation of first-class
+ rich components with built-in Ajax functionality even more easily than
+ the creation of simpler components by means of the traditional coding
+ approach.
+ </rich:panel>
+
+</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/look-customization.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/look-customization.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/look-customization.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -9,99 +9,12 @@
<p>
This is a demo of stylesheets usage and skinability features to adjust a panel look.
</p>
-<style>
-.rich-panel-header {
- color:#0054BD;
-}
-.panel {
- vertical-align:top;
-}
-.top {
- width:200px;height:100px;
-}
-.head2 {
- background-image : url();
- background-color : #4C9600;
- height:18px;
- text-align:center;
- vertical-align:middle;
- color:#CFF;
- padding:4px 0;
-}
-
-.body3 {
- height:100px;
- overflow:auto;
-}
-</style>
-<h:panelGrid columnClasses="panel" border="0"
columns="2">
- <rich:panel>
- <f:facet name="header">
- Panel #1. Changing Style Synchronously
- </f:facet>
- Each component in the RichFaces has a pre-defined set of classes you can manipulate
with. If defined, those
- classes overwrite the ones come from the skin.
- </rich:panel>
-
- <rich:panel>
- <f:facet name="header">
- Panel #2. Changing Style Synchronously
- </f:facet>
- In this example, we define header color using the .rich-panel-header class and all
panels located on the same page
- inherit this color
- </rich:panel>
-
-</h:panelGrid>
-
-<h:panelGrid columnClasses="panel" border="0"
columns="3">
- <rich:panel
- onmouseover="document.getElementById(this.id+'_header').style.background='#60BA01';document.getElementById(this.id+'_body').style.background='#F4FFF8'"
- onmouseout="document.getElementById(this.id+'_header').style.background='#4C9600';document.getElementById(this.id+'_body').style.background='#E4FFC8'"
- style="width:200px;" headerClass="head2"
bodyClass="body3">
- <f:facet name="header">
- Panel header
- </f:facet>
- Base on the previous layout, but some javascript behaviour added.
- </rich:panel>
-
- <rich:panel style="width:200px;" bodyClass="body3">
- <f:facet name="header">
- Scrolling Text Panel
- </f:facet>
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- Long Text Long Text Long Text
- </rich:panel>
-
- <rich:panel styleClass="top">
- This is a panel without the header
- </rich:panel>
-
- <rich:panel style="position: absolute; bottom: 300px; right: 100px; "
styleClass="top">
- <f:facet name="header">
- Panel header
- </f:facet>
- This is a panel with absolute position on the screen.<br/>
- Resize the browser's window to see the result.
- </rich:panel>
-
-</h:panelGrid>
-
+ <ui:include src="/richfaces/panel/examples/lookCustom.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/panel/examples/lookCustom.xhtml"/>
+ </ui:include>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/panel/source/look-customization.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -32,74 +32,36 @@
<div class="sample-container" >
- <rich:panel>
- <f:facet name="header">
- Write your own custom rich components with built-in AJAX support
- </f:facet>
- The CDK includes a code-generation facility and a
- templating facility using a JSP-like syntax. These capabilities help
- to avoid a routine process of a component creation. The component factory
- works like a well-oiled machine allowing the creation of first-class
- rich components with built-in Ajax functionality even more easily than
- the creation of simpler components by means of the traditional coding
- approach.
- </rich:panel>
- <br/>
-
+
+ <ui:include src="/richfaces/panel/examples/simplePanel.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/panel/examples/simplePanel.xhtml"/>
+ </ui:include>
+
+
</div>
<p>This is a panel without header:</p>
<div class="sample-container" >
- <rich:panel>
- RichFaces is a library for adding rich user interface features to JSF
- applications. It extends the Ajax4jsf framework to include a large
- (and growing) set of powerful rich AJAX-enabled components that come
- with extensive skins support.
- </rich:panel>
+
+ <ui:include src="/richfaces/panel/examples/headlessPanel.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/panel/examples/headlessPanel.xhtml"/>
+ </ui:include>
</div>
<p>The panels can be nested: </p>
<div class="sample-container" >
- <rich:panel style="padding:0"
headerClass="outpanelHeader">
- <f:facet name="header">
- <rich:spacer height="4" />
- </f:facet>
- <h2 align="center"><h:outputText value="Benefits of Using
Ajax4jsf" /></h2>
- <h:panelGrid columns="2" columnClasses="gridContent">
- <rich:panel bodyClass="inpanelBody">
- <f:facet name="header">
- For Application Developers
- </f:facet>
- For Application Developers
- <ul>
- <li>Production quality Open Source</li>
- <li>Does Open Source and has an Open Architecture</li>
- <li>Compatible with any JSF Implementation - MyFaces, JSF1.1,
JSF1.2</li>
- <li>Allows to Ajaxify JSF application without writing
Javascript</li>
- <li>Works with standard and third party components</li>
- <li>Adds the Ajax capability to existing non-Ajax components</li>
- </ul>
- </rich:panel>
- <rich:panel bodyClass="inpanelBody">
- <f:facet name="header" >
- For Component Developers
- </f:facet>
- <ul>
- <li>Ajax4jsf is Open Source and has an Open Architecture</li>
- <li>Gives an API to create components with built-in Ajax
support</li>
- <li>Has a Component Development Kit for rapid development</li>
- <li>Allows to skin the look-n-feel using both CSS and set of
skin-parameters</li>
- <li>Automatically generates the unit test-cases for developing
components</li>
- <li>Allows to pack javascript code, images, css inside the final
jar</li>
- </ul>
- </rich:panel>
- </h:panelGrid>
- </rich:panel>
+ <ui:include src="/richfaces/panel/examples/nestedPanels.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/panel/examples/nestedPanels.xhtml"/>
+ </ui:include>
+
</div>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,32 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:panelBar height="400" width="500">
+ <rich:panelBarItem label="Leverage the whole set of JSF benefits while working
with AJAX">
+ Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only give
you access to the managed bean facility, Ajax4jsf advantages the action and value change
listeners as well as invokes server-side validators and converters during the AJAX
request-response cycle.
+ </rich:panelBarItem>
+ <rich:panelBarItem label="Add AJAX capability to existing JSF
applications">
+ The framework is implemented using a component library. The library set Ajax
functionality into existing pages, so there is no need to write any JavaScript code or to
replace existing components with new Ajax one. Ajax4jsf enables page-wide Ajax support
instead of the traditional component-wide support and it gives the opportunity to define
the event on the page. An event invokes an Ajax request and areas of the page which are
synchronized with the JSF Component Tree after changing the data on the server by Ajax
request in accordance with events fired on the client.
+ </rich:panelBarItem>
+ <rich:panelBarItem label="Write your own custom rich components with built-in
AJAX support">
+ Component Development Kit (CDK) is a design-time extension for Ajax4jsf. The CDK
includes a code-generation facility and a templating facility using a JSP-like syntax.
These capabilities help to avoid a routine process of a component creation. The component
factory works like a well-oiled machine allowing the creation of first-class rich
components with built-in Ajax functionality even more easily than the creation of simpler
components by means of the traditional coding approach.
+ </rich:panelBarItem>
+ <rich:panelBarItem label="Package resources with the application's Java
classes ">
+ In addition to its core, Ajax functionality of Ajax4jsf provides an advanced support
for the different resources management: pictures, JavaScript code, and CSS stylesheets.
The resource framework makes possible to pack easily these resources into Jar files along
with the code of your custom components.
+ </rich:panelBarItem>
+ <rich:panelBarItem label="Easily generate images on-the-fly">
+ Resource framework can generate images on-the-fly so that it becomes possible to
create images using the familiar approach of the Java graphic2D library.
+ </rich:panelBarItem>
+ <rich:panelBarItem label="Create a modern rich user interface look-and-feel
with skins-based technology">
+ Ajax4jsf provides a skinability feature that allows easily define and manage different
color schemes and other parameters of the UI with the help of named skin parameters. Hence
it is possible to access the skin parameters from JSP code and the Java code (e.g. to
adjust generated on-the-fly images based on the text parts of the UI). Note: skinability
is not an equivalent of traditional CSS, but a complement.
+ </rich:panelBarItem>
+ <rich:panelBarItem label="Test the components, actions, listeners, and pages as
you are creating them">
+ An automated testing facility is in our roadmap for the near future. This facility
will generate test cases for your component as soon as you develop it. The testing
framework will not just test the components, but also any other server-side or client-side
functionality including JavaScript code. What is more, it will do all of this without
deploying the test application into the Servlet container.
+ </rich:panelBarItem>
+ </rich:panelBar>
+
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -6,9 +6,7 @@
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <style>
- </style>
<p>
The Richfaces Panel Bar is a set of panels when one panel is expanded,
but other ones are collapsed. The following demo shows the example
@@ -18,39 +16,14 @@
<div class="sample-container" >
- <rich:panelBar height="400" width="500">
- <rich:panelBarItem label="Leverage the whole set of JSF benefits while
working with AJAX">
- Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only
give you access to the managed bean facility, Ajax4jsf advantages the action and value
change listeners as well as invokes server-side validators and converters during the AJAX
request-response cycle.
- </rich:panelBarItem>
- <rich:panelBarItem label="Add AJAX capability to existing JSF
applications">
- The framework is implemented using a component library. The library set Ajax
functionality into existing pages, so there is no need to write any JavaScript code or to
replace existing components with new Ajax one. Ajax4jsf enables page-wide Ajax support
instead of the traditional component-wide support and it gives the opportunity to define
the event on the page. An event invokes an Ajax request and areas of the page which are
synchronized with the JSF Component Tree after changing the data on the server by Ajax
request in accordance with events fired on the client.
- </rich:panelBarItem>
- <rich:panelBarItem label="Write your own custom rich components with
built-in AJAX support">
- Component Development Kit (CDK) is a design-time extension for Ajax4jsf. The CDK
includes a code-generation facility and a templating facility using a JSP-like syntax.
These capabilities help to avoid a routine process of a component creation. The component
factory works like a well-oiled machine allowing the creation of first-class rich
components with built-in Ajax functionality even more easily than the creation of simpler
components by means of the traditional coding approach.
- </rich:panelBarItem>
- <rich:panelBarItem label="Package resources with the application's Java
classes ">
- In addition to its core, Ajax functionality of Ajax4jsf provides an advanced
support for the different resources management: pictures, JavaScript code, and CSS
stylesheets. The resource framework makes possible to pack easily these resources into Jar
files along with the code of your custom components.
- </rich:panelBarItem>
- <rich:panelBarItem label="Easily generate images on-the-fly">
- Resource framework can generate images on-the-fly so that it becomes possible to
create images using the familiar approach of the Java graphic2D library.
- </rich:panelBarItem>
- <rich:panelBarItem label="Create a modern rich user interface look-and-feel
with skins-based technology">
- Ajax4jsf provides a skinability feature that allows easily define and manage
different color schemes and other parameters of the UI with the help of named skin
parameters. Hence it is possible to access the skin parameters from JSP code and the Java
code (e.g. to adjust generated on-the-fly images based on the text parts of the UI). Note:
skinability is not an equivalent of traditional CSS, but a complement.
- </rich:panelBarItem>
- <rich:panelBarItem label="Test the components, actions, listeners, and
pages as you are creating them">
- An automated testing facility is in our roadmap for the near future. This facility
will generate test cases for your component as soon as you develop it. The testing
framework will not just test the components, but also any other server-side or client-side
functionality including JavaScript code. What is more, it will do all of this without
deploying the test application into the Servlet container.
- </rich:panelBarItem>
- </rich:panelBar>
-
+ <ui:include src="/richfaces/panelBar/examples/example.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/panelBar/examples/example.xhtml"/>
+ </ui:include>
</div>
-
-
+
</ui:define>
- <ui:define name="sources">
- <p>
- Here is a fragment of page sources for the given example:
- </p>
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/panelBar/source/usage.html"
class="source_frame"/>
- </ui:define>
+
+
</ui:composition>
</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/examples/clock.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/examples/clock.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/examples/clock.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,26 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1"/>
+ <a4j:region>
+ <h:form>
+ <a4j:poll id="poll" interval="500"
enabled="#{userBean.pollEnabled}" reRender="serverDate"/>
+ </h:form>
+ </a4j:region>
+ <h:form>
+ <h:panelGrid columns="2" width="80%">
+ <a4j:commandButton style="width:120px" id="control"
+ value="#{userBean.pollEnabled?'Stop':'Start'}
Polling"
+ reRender="poll, control">
+ <a4j:actionparam name="polling"
value="#{!userBean.pollEnabled}"
+ assignTo="#{userBean.pollEnabled}"/>
+ </a4j:commandButton>
+ <h:outputText id="serverDate" style="font-size:16px"
value="Server Date: #{userBean.date}"/>
+ </h:panelGrid>
+ </h:form>
+ <rich:separator height="1" style="padding-top:10px"/>
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -21,25 +21,13 @@
taken from the server.</p>
<div class="sample-container">
- <rich:separator height="1"/>
- <a4j:region>
- <h:form>
- <a4j:poll id="poll" interval="500"
enabled="#{userBean.pollEnabled}" reRender="serverDate"/>
- </h:form>
- </a4j:region>
- <h:form>
- <h:panelGrid columns="2" width="80%">
- <a4j:commandButton style="width:120px" id="control"
- value="#{userBean.pollEnabled?'Stop':'Start'}
Polling"
- reRender="poll, control">
- <a4j:actionparam name="polling"
value="#{!userBean.pollEnabled}"
- assignTo="#{userBean.pollEnabled}"/>
- </a4j:commandButton>
- <h:outputText id="serverDate" style="font-size:16px"
value="Server Date: #{userBean.date}"/>
- </h:panelGrid>
- </h:form>
- <rich:separator height="1" style="padding-top:10px"/>
+
+ <ui:include src="/richfaces/poll/examples/clock.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/poll/examples/clock.xhtml"/>
+ </ui:include>
</div>
+
<p><b>interval</b> attribute defines the interval in ms between the
previous response and the
next request. So, the total period between two request generated by a4j:poll is a sum
of interval
@@ -96,10 +84,6 @@
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/poll/source/usage.html"
- class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/selfRender.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/selfRender.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/selfRender.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,53 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1" />
+
+ <h:panelGrid columns="2" width="100%">
+
+ <a4j:region selfRendered="true">
+ <h:panelGroup>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Name" />
+ <h:inputText value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="out3,outname2"
/>
+ </h:inputText>
+ </h:panelGrid>
+ </h:form>
+ <h:panelGroup id="out3">
+ This text will disappear during the partial update of this panel.
+ The text appears again only after the whole page refresh or a partial
+ update from the region with selfRendered="false" (default value).
+ </h:panelGroup>
+ </h:panelGroup>
+ </a4j:region>
+
+ <a4j:region selfRendered="true">
+ <h:panelGroup>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="Name" />
+ <h:inputText value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="out4,outname2"
/>
+ </h:inputText>
+ </h:panelGrid>
+ </h:form>
+ <h:panelGroup id="out4">
+ <h:outputText value="The text of the similar panel will
+ not disappear because it is printed with h:outputText" />
+ </h:panelGroup>
+ </h:panelGroup>
+ </a4j:region>
+
+ </h:panelGrid>
+ <h:outputText id="outname2" style="font-weight:bold"
+ value="Typed Name: #{userBean.name}" />
+
+ <rich:separator style="padding-top:10px" height="1" />
+
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/validationErrorIssue.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/validationErrorIssue.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/examples/validationErrorIssue.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,41 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1" />
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages style="color:red" />
+ </a4j:outputPanel>
+ <h:panelGrid columns="2" width="100%">
+
+ <h:form id="form1">
+ <h:panelGrid columns="2">
+ <h:outputText value="Name" />
+ <h:inputText value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="outname" />
+ </h:inputText>
+ <h:outputText value="Job:" />
+ <h:inputText required="true" id="job2"
value="#{userBean.job}" />
+ </h:panelGrid>
+ </h:form>
+
+ <h:form id="form2">
+ <h:panelGrid columns="2">
+ <h:outputText value="Name" />
+ <a4j:region>
+ <h:inputText value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="outname" />
+ </h:inputText>
+ </a4j:region>
+ <h:outputText value="Job" />
+ <h:inputText required="true" id="job1"
value="#{userBean.job}" />
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGrid>
+ <h:outputText id="outname" style="font-weight:bold"
value="Typed Name: #{userBean.name}" />
+ <rich:separator style="padding-top:10px" height="1" />
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/region/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -35,40 +35,11 @@
while the "Job" field is empty.
</p>
<div class="sample-container" >
- <rich:separator height="1" />
- <a4j:outputPanel ajaxRendered="true">
- <h:messages style="color:red" />
- </a4j:outputPanel>
- <h:panelGrid columns="2" width="100%">
- <h:form id="form1">
- <h:panelGrid columns="2">
- <h:outputText value="Name" />
- <h:inputText value="#{userBean.name}">
- <a4j:support event="onkeyup" reRender="outname" />
- </h:inputText>
- <h:outputText value="Job:" />
- <h:inputText required="true" id="job2"
value="#{userBean.job}" />
- </h:panelGrid>
- </h:form>
-
- <h:form id="form2">
- <h:panelGrid columns="2">
- <h:outputText value="Name" />
- <a4j:region>
- <h:inputText value="#{userBean.name}">
- <a4j:support event="onkeyup" reRender="outname" />
- </h:inputText>
- </a4j:region>
- <h:outputText value="Job" />
- <h:inputText required="true" id="job1"
value="#{userBean.job}" />
- </h:panelGrid>
- </h:form>
-
- </h:panelGrid>
- <h:outputText id="outname" style="font-weight:bold"
value="Typed Name: #{userBean.name}" />
- <rich:separator style="padding-top:10px" height="1" />
-
+ <ui:include
src="/richfaces/region/examples/validationErrorIssue.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/region/examples/validationErrorIssue.xhtml"/>
+ </ui:include>
</div>
<p>
If no one region is defined explicitly on the page, the whole view plays the role of
a region.
@@ -105,61 +76,15 @@
</p>
<div class="sample-container" >
- <rich:separator height="1" />
- <h:panelGrid columns="2" width="100%">
-
- <a4j:region selfRendered="true">
- <h:panelGroup>
- <h:form>
- <h:panelGrid columns="2">
- <h:outputText value="Name" />
- <h:inputText value="#{userBean.name}">
- <a4j:support event="onkeyup" reRender="out3,outname2"
/>
- </h:inputText>
- </h:panelGrid>
- </h:form>
- <h:panelGroup id="out3">
- This text will disappear during the partial update of this panel.
- The text appears again only after the whole page refresh or a partial
- update from the region with selfRendered="false" (default value).
- </h:panelGroup>
- </h:panelGroup>
- </a4j:region>
-
- <a4j:region selfRendered="true">
- <h:panelGroup>
- <h:form>
- <h:panelGrid columns="2">
- <h:outputText value="Name" />
- <h:inputText value="#{userBean.name}">
- <a4j:support event="onkeyup" reRender="out4,outname2"
/>
- </h:inputText>
- </h:panelGrid>
- </h:form>
- <h:panelGroup id="out4">
- <h:outputText value="The text of the similar panel will
- not disappear because it is printed with h:outputText" />
- </h:panelGroup>
- </h:panelGroup>
- </a4j:region>
-
- </h:panelGrid>
- <h:outputText id="outname2" style="font-weight:bold"
- value="Typed Name: #{userBean.name}" />
-
- <rich:separator style="padding-top:10px" height="1" />
-
+ <ui:include src="/richfaces/region/examples/selfRender.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/region/examples/selfRender.xhtml"/>
+ </ui:include>
</div>
-
+
<rich:spacer height="30" />
</ui:define>
-
-
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/region/source/usage.html"
class="source_frame"/>
- </ui:define>
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/examples/manually.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/examples/manually.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/examples/manually.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,53 @@
+<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.ajax4jsf.org/rich">
+
+ <a4j:loadScript
src="resource:///org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous.js"/>
+ <a4j:loadScript
src="resource:///org/richfaces/renderkit/html/scripts/scriptaculous/effects.js"/>
+
+ <h:commandButton onclick="new Effect.BlindUp($('mypanel_body'),
{duration:.3});return false" value="Hide"></h:commandButton>
+ <h:commandButton onclick="new Effect.Appear($('mypanel_body'));return
false" value="Show"></h:commandButton>
+
+ <rich:separator height="1" style="padding:10px 0" />
+
+ <rich:panel id="mypanel">
+ <f:facet name="header">
+ <h:outputText value="Using Scriptaculous Effects"/>
+ </f:facet>
+
+
+
+
+ <h:panelGrid styleClass="rsPanel" width="250"
columns="2">
+ <h:outputText styleClass="rsLabel" value="Name:" />
+ <h:inputText styleClass="rsInput" value="#{userBean.name}"
/>
+
+ <h:outputText styleClass="rsLabel" value="Job:" />
+ <h:inputText styleClass="rsInput" value="#{userBean.job}"
/>
+
+ <h:panelGroup />
+ <h:commandButton styleClass="rsButton" value="Submit">
+ <a4j:support disableDefault="true" event="onclick"
reRender="out" />
+ </h:commandButton>
+
+ <f:facet name="footer">
+ </f:facet>
+
+ </h:panelGrid>
+ <h:panelGrid id="out" columns="1">
+
+ <h:outputText value=""/>
+ <h:outputText value="You have just entered:"/>
+ <h:outputText value="Name: #{userBean.name}" />
+ <h:outputText value="Job: #{userBean.job}" />
+ </h:panelGrid>
+
+ </rich:panel>
+
+ <rich:spacer height="20" />
+
+
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -34,63 +34,25 @@
a client-side effects.
</p>
- <a4j:loadScript
src="resource://org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/scriptaculous.js"/>
- <a4j:loadScript
src="resource:///org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/effects.js"/>
<div id="itme" class="sample-container">
- <h:commandButton onclick="new Effect.BlindUp($('mypanel_body'),
{duration:.3});return false" value="Hide"></h:commandButton>
- <h:commandButton onclick="new
Effect.Appear($('mypanel_body'));return false"
value="Show"></h:commandButton>
- <rich:separator height="1" style="padding:10px 0" />
-
- <div id="mdiv">
- <rich:panel id="mypanel">
- <f:facet name="header">
- <h:outputText value="Using Scriptaculous Effects"/>
- </f:facet>
-
-
-
-
- <h:panelGrid styleClass="rsPanel" width="250"
columns="2">
- <h:outputText styleClass="rsLabel" value="Name:" />
- <h:inputText styleClass="rsInput"
value="#{userBean.name}" />
-
- <h:outputText styleClass="rsLabel" value="Job:" />
- <h:inputText styleClass="rsInput" value="#{userBean.job}"
/>
-
- <h:panelGroup />
- <h:commandButton styleClass="rsButton" value="Submit">
- <a4j:support disableDefault="true" event="onclick"
reRender="out" />
- </h:commandButton>
-
- <f:facet name="footer">
- </f:facet>
-
- </h:panelGrid>
- <h:panelGrid id="out" columns="1">
-
- <h:outputText value=""/>
- <h:outputText value="You have just entered:"/>
- <h:outputText value="Name: #{userBean.name}" />
- <h:outputText value="Job: #{userBean.job}" />
- </h:panelGrid>
-
- </rich:panel>
-
- <rich:spacer height="20" />
- </div>
-
-
+ <ui:include src="/richfaces/script/examples/manually.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/script/examples/manually.xhtml"/>
+ </ui:include>
+
</div>
+
+
<p>
Note that if you have an Ajax functionality on the page, the prototype.js is already
attached to this page and you do not have to include it explicitly once more.
</p>
+ <p>
+ Since version 3.1.0, RichFaces introduced the rich:effect component. So, you do not
have
+ to program with javascript to have effects in your application.
+ </p>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/script/source/usage.html"
class="source_frame"/>
- </ui:define>
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/examples/variants.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/examples/variants.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/examples/variants.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,23 @@
+<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.ajax4jsf.org/rich">
+
+ <p>
+ This is default separator:
+ <rich:separator />
+ </p>
+ <p>
+ This is tick 75% beveled separator aligned to the center:
+ <rich:separator lineType="beveled" height="8"
width="75%" align="center"/>
+ </p>
+ <p>
+ Here is more examples of different line types:
+ <rich:separator height="2" lineType="dotted"/><br/>
+ <rich:separator height="2" lineType="dashed"/><br/>
+ <rich:separator height="4" lineType="double"/><br/>
+ <rich:separator height="2" lineType="solid"/><br/>
+ </p>
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/separator/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -10,25 +10,14 @@
Separator is used to draw a horizontal line on a page. You may specify different types
of a line, possible values are "beveled" (default), "dotted",
"dashed", "double" and "solid".
You also may specify width, height and alignment for the separator.
</p>
- <p>
- This is default separator:
- <rich:separator />
- </p>
- <p>
- This is tick 75% beveled separator aligned to the center:
- <rich:separator lineType="beveled" height="8"
width="75%" align="center"/>
- </p>
- <p>
- Here is more examples of different line types:
- <rich:separator height="2" lineType="dotted"/><br/>
- <rich:separator height="2" lineType="dashed"/><br/>
- <rich:separator height="4" lineType="double"/><br/>
- <rich:separator height="2" lineType="solid"/><br/>
- </p>
+ <div class="sample-container">
+
+ <ui:include src="/richfaces/separator/examples/variants.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/separator/examples/variants.xhtml"/>
+ </ui:include>
+ </div>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example. Note how we use skin
parameters to define a border color for span.
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/separator/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/basic.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/basic.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/basic.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,19 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:simpleTogglePanel switchType="client" label="Add AJAX capability
to existing JSF applications">
+ The framework is implemented by using a component library. The library
+ set Ajax functionality into existing pages, so there is no need to write
+ any JavaScript code or to replace existing components with new Ajax one.
+ Ajax4jsf enables page-wide Ajax support instead of the traditional
+ component-wide support and it gives the opportunity to define the event
+ on the page. An event invokes an Ajax request and areas of the page
+ which are synchronized with the JSF Component Tree after changing the
+ data on the server by Ajax request in accordance with events fired on
+ the client.
+ </rich:simpleTogglePanel>
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/difftypes.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/difftypes.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/examples/difftypes.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,30 @@
+<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.ajax4jsf.org/rich">
+
+ <h:form>
+ <h:panelGrid columns="3" columnClasses="tpanels"
width="100%">
+
+ <rich:simpleTogglePanel switchType="server" label="Server Switch
Type">
+ The regular JSF form submission is processed during the changing mode between
+ showing and hidding the additional content.
+ </rich:simpleTogglePanel>
+
+ <rich:simpleTogglePanel switchType="ajax" label="Ajax Switch
Type">
+ This type allows to perform the partual view update instead of the
+ whole page reloading. You also can point to other areas of the view
+ to be re-rendered while the panel content is toggled.
+ </rich:simpleTogglePanel>
+
+ <rich:simpleTogglePanel switchType="client" label="Client Switch
Type">
+ The switching between showing and hiding the toggle panel content
+ performs on the client side.
+ </rich:simpleTogglePanel>
+
+ </h:panelGrid>
+ </h:form>
+
+</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -15,59 +15,32 @@
height:140px;
}
</style>
- <p>SimpleTogglePanel represents a panel with a base text label at the top and an
additional
+ <p>SimpleTogglePanel represents a panel with a base text label at the top and an
additional
content that can be shown or hidden. The additional content is shown or hidden
using the simpleTogglePanel control located to the right of the base text label by
default.<br />
This is an example of the component with default look-n-feel:
</p>
<div class="sample-container" >
- <rich:simpleTogglePanel switchType="client" label="Add AJAX
capability to existing JSF applications">
- The framework is implemented by using a component library. The library
- set Ajax functionality into existing pages, so there is no need to write
- any JavaScript code or to replace existing components with new Ajax one.
- Ajax4jsf enables page-wide Ajax support instead of the traditional
- component-wide support and it gives the opportunity to define the event
- on the page. An event invokes an Ajax request and areas of the page
- which are synchronized with the JSF Component Tree after changing the
- data on the server by Ajax request in accordance with events fired on
- the client.
- </rich:simpleTogglePanel>
+
+ <ui:include
src="/richfaces/simpleTogglePanel/examples/basic.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/simpleTogglePanel/examples/basic.xhtml"/>
+ </ui:include>
</div>
+
+
<p>The switchType attribute allows to select a toggle approach that can be
'client',
'server' or 'ajax'. The 'server' and 'ajax' types
require to be surround with a form element such as <h:form> or
<a4j:form>.
</p>
<div class="sample-container" >
- <h:form>
- <h:panelGrid columns="3" columnClasses="tpanels"
width="100%">
-
- <rich:simpleTogglePanel switchType="server" label="Server Switch
Type">
- The regular JSF form submission is processed during the changing mode between
- showing and hidding the additional content.
- </rich:simpleTogglePanel>
-
- <rich:simpleTogglePanel switchType="ajax" label="Ajax Switch
Type">
- This type allows to perform the partual view update instead of the
- whole page reloading. You also can point to other areas of the view
- to be re-rendered while the panel content is toggled.
- </rich:simpleTogglePanel>
-
- <rich:simpleTogglePanel switchType="client" label="Client Switch
Type">
- The switching between showing and hiding the toggle panel content
- performs on the client side.
- </rich:simpleTogglePanel>
-
- </h:panelGrid>
- </h:form>
+
+ <ui:include
src="/richfaces/simpleTogglePanel/examples/difftypes.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/simpleTogglePanel/examples/difftypes.xhtml"/>
+ </ui:include>
</div>
-
-
</ui:define>
- <ui:define name="sources">
- <p>
- Here is fragment of page sources for given example:
- </p>
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/simpleTogglePanel/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/cleaner.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/cleaner.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/cleaner.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,44 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1"/>
+ <a4j:region id="extr">
+ <h:form>
+ <h:outputText value="Status:" />
+ <a4j:status id="commonstatus" startText="In Progress...."
stopText=""/>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Name"/>
+ <h:inputText id="name" value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="out" />
+ </h:inputText>
+
+ <h:outputText value="Job"/>
+ <a4j:region id="intr">
+ <h:inputText id="job" value="#{userBean.job}">
+ <a4j:support event="onkeyup" reRender="out"
status="commonstatus"/>
+ </h:inputText>
+ </a4j:region>
+
+ <h:panelGroup />
+
+
+
+ </h:panelGrid>
+ <a4j:region>
+ <h:outputText id="out" value="Name: #{userBean.name}, Job:
#{userBean.job}" />
+ <br />
+ <a4j:commandButton ajaxSingle="true" value="Clean Up Form"
reRender="name, job, out" status="commonstatus">
+ <a4j:actionparam name="n" value=""
assignTo="#{userBean.name}" />
+ <a4j:actionparam name="j" value=""
assignTo="#{userBean.job}" />
+ </a4j:commandButton>
+ </a4j:region>
+
+ </h:form>
+ </a4j:region>
+ <rich:separator height="1" style="padding-top:10px"/>
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/pictured.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/pictured.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/pictured.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,26 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1"/>
+ <a4j:region id="rb">
+ <h:panelGrid columns="2">
+
+ <h:form>
+ <a4j:commandButton eventsQueue="foo2" value="Ajax Request
2"/>
+ </h:form>
+
+ <a4j:status>
+ <f:facet name="start">
+ <h:graphicImage value="/images/ajax/ajax_process.gif"/>
+ </f:facet>
+ </a4j:status>
+
+ </h:panelGrid>
+ </a4j:region>
+ <rich:separator height="1" style="padding-top:10px"/>
+
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/simple.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/examples/simple.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,17 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1"/>
+ <h:outputText value="Ajax Status:"/>
+
+ <a4j:status id="commonstatus" startText="In progress..."
stopText="Complete"/>
+
+ <h:form>
+ <a4j:commandButton eventsQueue="foo" value="Ajax
Request"/>
+ </h:form>
+ <rich:separator height="1" style="padding-top:10px"/>
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -15,15 +15,12 @@
the component switches to the stop stage.
</p>
<div class="sample-container" >
-
- <h:outputText value="Ajax Status:"/>
-
- <a4j:status id="commonstatus" startText="In progress..."
stopText="Complete"/>
-
- <h:form>
- <a4j:commandButton eventsQueue="foo" value="Ajax
Request"/>
- </h:form>
+ <ui:include src="/richfaces/status/examples/simple.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/status/examples/simple.xhtml"/>
+ </ui:include>
</div>
+
<p>
<b>startText</b> attribute defines the label that will be visible when
the Ajax request
is in progress. You can use <b>startStyle</b> or
<b>startStyleClass</b> attribuite to
@@ -46,21 +43,10 @@
</p>
<div class="sample-container" >
- <a4j:region id="rb">
- <h:panelGrid columns="2">
-
- <h:form>
- <a4j:commandButton eventsQueue="foo2" value="Ajax Request
2"/>
- </h:form>
-
- <a4j:status>
- <f:facet name="start">
- <h:graphicImage value="/images/ajax/ajax_process.gif"/>
- </f:facet>
- </a4j:status>
-
- </h:panelGrid>
- </a4j:region>
+ <ui:include src="/richfaces/status/examples/pictured.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/status/examples/pictured.xhtml"/>
+ </ui:include>
</div>
@@ -100,48 +86,13 @@
<div class="sample-container" >
- <rich:separator height="1"/>
- <a4j:region id="extr">
- <h:form>
- <h:outputText value="Status:" />
- <a4j:status id="commonstatus" startText="In Progress...."
stopText=""/>
-
- <h:panelGrid columns="2">
- <h:outputText value="Name"/>
- <h:inputText id="name" value="#{userBean.name}">
- <a4j:support event="onkeyup" reRender="out" />
- </h:inputText>
-
- <h:outputText value="Job"/>
- <a4j:region id="intr">
- <h:inputText id="job" value="#{userBean.job}">
- <a4j:support event="onkeyup" reRender="out"
status="commonstatus"/>
- </h:inputText>
- </a4j:region>
-
- <h:panelGroup />
-
-
-
- </h:panelGrid>
- <a4j:region>
- <h:outputText id="out" value="Name: #{userBean.name}, Job:
#{userBean.job}" />
- <br />
- <a4j:commandButton ajaxSingle="true" value="Clean Up Form"
reRender="name, job, out" status="commonstatus">
- <a4j:actionparam name="n" value=""
assignTo="#{userBean.name}" />
- <a4j:actionparam name="j" value=""
assignTo="#{userBean.job}" />
- </a4j:commandButton>
- </a4j:region>
-
- </h:form>
- </a4j:region>
- <rich:separator height="1" style="padding-top:10px"/>
+ <ui:include src="/richfaces/status/examples/cleaner.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/status/examples/cleaner.xhtml"/>
+ </ui:include>
</div>
</ui:define>
- <ui:define name="sources">
- Here is a fragment of page sources for the given example:
- <iframe
src="${facesContext.externalContext.requestContextPath}/richfaces/status/source/usage.html"
class="source_frame"/>
- </ui:define>
+
</ui:composition>
</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/echo.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/echo.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/examples/echo.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -0,0 +1,19 @@
+<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.ajax4jsf.org/rich">
+
+ <rich:separator height="1"/>
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:inputText value="#{userBean.name}">
+ <a4j:support event="onkeyup" reRender="outtext" />
+ </h:inputText>
+ <h:outputText id="outtext" value="#{userBean.name}" />
+ </h:panelGrid>
+ </h:form>
+ <rich:separator height="1" style="padding-top:10px"/>
+
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -30,19 +30,14 @@
<div class="sample-container" >
- <rich:separator height="1"/>
- <h:form>
- <h:panelGrid columns="2">
- <h:inputText value="#{userBean.name}">
- <a4j:support event="onkeyup" reRender="outtext" />
- </h:inputText>
- <h:outputText id="outtext" value="#{userBean.name}" />
- </h:panelGrid>
- </h:form>
- <rich:separator height="1" style="padding-top:10px"/>
+
+
+ <ui:include src="/richfaces/support/examples/echo.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/support/source/usage.xhtml"/>
- </ui:include>
+ <ui:param name="sourcepath"
value="/richfaces/support/examples/echo.xhtml"/>
+ </ui:include>
+
+
</div>
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2007-08-10
21:38:39 UTC (rev 2208)
+++
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2007-08-10
22:31:19 UTC (rev 2209)
@@ -19,6 +19,13 @@
</script>
<style>
+ .viewsourcepanel {
+ padding-bottom:0px;
+ width:100%;
+ overflow:auto;
+ border-width:0;
+ background-color:#FFFFE7;
+ }
.viewsourcebody {
padding:0;
}
@@ -53,17 +60,19 @@
</style>
<f:subview>
+ <div>
<a4j:outputPanel styleClass="viewsourcelooklink" id="look">
- <rich:effect for="look" event="onclick"
type="BlindDown" params="id:'source1',
delay:0.1,duration:1.0,from:0.1,to:1.0" />
- <rich:effect for="look" event="onclick" type="Fade"
params="duration:0.1" />
- View Source >>
+ <rich:effect for="look" event="onclick"
type="BlindDown"
params="id:'source1',duration:1.0,from:0.0,to:1.0" />
+ <rich:effect for="look" event="onclick"
type="Appear"
params="id:'source1',duration:0.5,from:0.0,to:1.0" />
+ <rich:effect for="look" event="onclick" type="Fade"
params="duration:0.0" />
+ <h:outputText escape="false" value="#{empty openlabel?'View
Source' : openlabel }" />
</a4j:outputPanel>
- <rich:panel bodyClass="viewsourcebody"
headerClass="viewsourceheader" id="source1"
style="padding-bottom:0px;width:100%;overflow:auto;display:none;border-width:0;background-color:#FFFFE7
!important">
+ <rich:panel id="source1" bodyClass="viewsourcebody"
headerClass="viewsourceheader" styleClass="viewsourcepanel"
style="display:none">
<f:facet name="header">
<rich:spacer height="3px" />
</f:facet>
<div class="viewsourcediv">
- <rich:insert src="#{sourcepath}" highlight="xhtml"/>
+ <rich:insert src="#{sourcepath}" highlight="#{empty sourcetype?
'xhtml' : sourcetype }"/>
</div>
<a4j:outputPanel id="hide" styleClass="viewsourcehidelink">
@@ -73,6 +82,7 @@
</a4j:outputPanel>
</rich:panel>
+ </div>
</f:subview>