Author: ilya_shaikovsky
Date: 2007-09-03 10:59:31 -0400 (Mon, 03 Sep 2007)
New Revision: 2717
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenerReg.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenermessage.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/page.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
Log:
Coming Soon pages finally replaced with actual descriptions or demos.
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
---
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-09-03
14:31:40 UTC (rev 2716)
+++
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-09-03
14:59:31 UTC (rev 2717)
@@ -47,7 +47,7 @@
support= ajaxSupport, Ajax Support, /images/ico_common.gif,
/images/cn_ajaxSupport.gif,
RichFacesComponentsLibrary.html#support,
jbossajax4jsf/freezone/docs/tlddoc/a4j/support.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxSupport.html,
/richfaces/support.jsf
jsFunction= ajaxSupport, JS Function, /images/ico_common.gif,
/images/cn_jsFunction.gif,
RichFacesComponentsLibrary.html#jsFunction,
jbossajax4jsf/freezone/docs/tlddoc/a4j/jsFunction.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxFunction.html,
/richfaces/jsFunction.jsf
poll= ajaxSupport, Poll, /images/ico_common.gif,
/images/cn_poll.gif,
RichFacesComponentsLibrary.html#poll,
jbossajax4jsf/freezone/docs/tlddoc/a4j/poll.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPoll.html,
/richfaces/poll.jsf
-push= ajaxSupport, Push, /images/ico_common.gif,
/images/cn_push.gif,
RichFacesComponentsLibrary.html#push,
jbossajax4jsf/freezone/docs/tlddoc/a4j/push.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPush.html,
/richfaces/comingSoon.jsf
+push= ajaxSupport, Push, /images/ico_common.gif,
/images/cn_push.gif,
RichFacesComponentsLibrary.html#push,
jbossajax4jsf/freezone/docs/tlddoc/a4j/push.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPush.html,
/richfaces/push.jsf
status= ajaxSupport, Status, /images/ico_common.gif,
/images/cn_status.gif,
RichFacesComponentsLibrary.html#status,
jbossajax4jsf/freezone/docs/tlddoc/a4j/status.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxStatus.html,
/richfaces/status.jsf
ajaxListener= ajaxSupport, Ajax Listener, /images/ico_common.gif,
/images/cn_ajaxListener.gif,
RichFacesComponentsLibrary.html#ajaxListener,
jbossajax4jsf/freezone/docs/tlddoc/a4j/ajaxListener.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.html,
/richfaces/ajaxListener.jsf
region= ajaxSupport, Ajax Region, /images/ico_common.gif,
/images/cn_ajaxRegion.gif,
RichFacesComponentsLibrary.html#region,
jbossajax4jsf/freezone/docs/tlddoc/a4j/region.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxRegion.html,
/richfaces/region.jsf
@@ -59,8 +59,8 @@
mediaOutput= ajaxOutput, Media Output, /images/ico_common.gif,
/images/cn_MediaOutput.gif,
RichFacesComponentsLibrary.html#mediaOutput,
jbossajax4jsf/freezone/docs/tlddoc/a4j/mediaOutput.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/resource/UIMediaOutput.html,
/richfaces/mediaOutput.jsf
outputPanel= ajaxOutput, Output Panel, /images/ico_common.gif,
/images/cn_OutputPanel.gif,
RichFacesComponentsLibrary.html#outputPanel,
jbossajax4jsf/freezone/docs/tlddoc/a4j/outputPanel.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxOutputPanel.html,
/richfaces/outputPanel.jsf
repeat= richDataIterators, Repeat, /images/ico_common.gif,
/images/cn_Repeat.gif,
RichFacesComponentsLibrary.html#repeat,
jbossajax4jsf/freezone/docs/tlddoc/a4j/repeat.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/repeat/UIRepeat.html,
/richfaces/repeat.jsf
-htmlCommandLink= ajaxMisc, Html Command Link, /images/ico_common.gif,
/images/cn_HtmlCommandLink.gif,
RichFacesComponentsLibrary.html#htmlCommandLink,
jbossajax4jsf/freezone/docs/tlddoc/a4j/htmlCommandLink.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.html,
/richfaces/comingSoon.jsf
+htmlCommandLink= ajaxMisc, Html Command Link, /images/ico_common.gif,
/images/cn_HtmlCommandLink.gif,
RichFacesComponentsLibrary.html#htmlCommandLink,
jbossajax4jsf/freezone/docs/tlddoc/a4j/htmlCommandLink.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/renderkit/html/HtmlCommandLinkRenderer.html,
/richfaces/htmlCommandLink.jsf
log= ajaxMisc, Log, /images/ico_common.gif,
/images/cn_Log.gif,
RichFacesComponentsLibrary.html#log,
jbossajax4jsf/freezone/docs/tlddoc/a4j/log.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxLog.html,
/richfaces/log.jsf
page= ajaxMisc, Ajax Page, /images/ico_common.gif,
/images/cn_AjaxPage.gif,
RichFacesComponentsLibrary.html#page,
jbossajax4jsf/freezone/docs/tlddoc/a4j/page.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxRegion.html,
/richfaces/page.jsf
-portlet= ajaxMisc, Ajax Portlet, /images/ico_common.gif,
/images/cn_AjaxPortlet.gif,
RichFacesComponentsLibrary.html#portlet,
jbossajax4jsf/freezone/docs/tlddoc/a4j/portlet.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPortlet.html,
/richfaces/comingSoon.jsf
+portlet= ajaxMisc, Ajax Portlet, /images/ico_common.gif,
/images/cn_AjaxPortlet.gif,
RichFacesComponentsLibrary.html#portlet,
jbossajax4jsf/freezone/docs/tlddoc/a4j/portlet.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPortlet.html,
/richfaces/portlet.jsf
effect= richMisc, Effect, /images/ico_common.gif,
/images/cn_Effect.gif, ArchitectureOverview.html,
jbossrichfaces/freezone/docs/tlddoc/overview-summary.html,
jbossrichfaces/freezone/docs/apidoc/overview-summary.html,
/richfaces/effect.jsf
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink/usage.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink/usage.xhtml 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <p>a4j:htmlCommandLink functionality is similar to the standard h:commandLink
component except the additional feature.
+
+ </p>
+ <p>
+ h:commandLink renderer generates the javascript code that is used to submit the form
when the link
+ is clicked. However, if the h:commandLink is rendered outside of the form, for
example, when
+ you point to it with reRender, the wrong code is generated that causes the broken
functionality.
+ This issue could be solved by a4j:form usage.
+ </p>
+ <p>But another problem that the link should render hidden inputs
+ for its parameters encoding. And this fields will not be generated if the link was
not initially rendered and
+ then updated via ajax. So this problems solves with the a4j:htmlCommandLink usage.
Nesessary fields encodes
+ even when link is not rendered initially. So it may be ajax updated and parameters
will work correctly.
+ </p>
+ <rich:insert highlight="xhtml"
src="/richfaces/htmlCommandLink/snippets/commandLinkProblem.xhtml"></rich:insert>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/htmlCommandLink.xhtml 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components -
Html Command Link</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/htmlCommandLink/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="a4j/htmlCommandLink"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet/usage.xhtml
(rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet/usage.xhtml 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+ <p>
+ The <a4j:portlet> should be used in portal environment. The main
+ component purpose is realization of possibility to create several instances
+ the same portlet on one page.
+ </p>
+ <p>
+ Portal page can include some instances of the same portlet but clientId of
+ elements should be different for each window. In that case 'namespace' is used
+ for each portlet. The <a4j:portlet> implemets NaimingContainer interface
and
+ adds namespace to all componets on a page. All portlet content should be
+ wrapped by <a4j:portlet> for resolving problems mentioned before.
+ </p>
+ <p>
+ More info about portal environments support can be found on the users forums.
+ </p>
+ <p>
+ Portlet Sample coulod be checked out from JBoss SVN:
+ <a
href="http://anonsvn.jboss.org/repos/ajax4jsf/trunk/samples/portal-e...
+ portal-echo application
+ </a>
+ </p>
+ <p>
+ Usage instructions for this demo could be found at corresponding:
+ <a
href="http://www.jboss.com/index.html?module=bb&op=viewtopic...
+ JBoss forum topic
+ </a>
+ </p>
+ <ui:remove>
+ <div class="sample-container">
+ <ui:include src="/richfaces/push/examples/push.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/push/examples/push.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
+ </div>
+ </ui:remove>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet.xhtml
(rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/portlet.xhtml 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components -
Portlet component</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/portlet/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="a4j/portlet"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenerReg.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenerReg.java
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenerReg.java 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,5 @@
+public void addListener(EventListener listener) {
+synchronized (listener) {
+ if (this.listener != listener) {
+ this.listener = (PushEventListener) listener;
+}
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenermessage.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenermessage.java
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/listenermessage.java 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,4 @@
+System.out.println("event occurs");
+synchronized (listener) {
+ listener.onEvent(new EventObject(this));
+}
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/page.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/page.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/page.xhtml 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1 @@
+<a4j:push reRender="msg"
eventProducer="#{messageBean.addListener}" interval="3000"/>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
(rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml 2007-09-03
14:59:31 UTC (rev 2717)
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+ <p>
+ The <a4j:push> periodically perform AJAX request to server, to simulate
'push' data.
+ </p>
+ <p>
+ The main difference between <a4j:push> and <a4j:poll>
components
+ is that <a4j:push> makes request to minimal code only (not to JSF
tree)
+ in order to check the presence of messages in the queue. If the message exists
+ the complete request will be performed. The component doesn't poll registered
+ beans but registers EventListener which receives messages about events.
+ </p>
+ <p>
+ Attribute 'interval' is used as for poll component. It specifies the interval
in ms.
+ for call push request. Simple example of usage:
+ </p>
+ <p>
+ Page code:
+ <rich:insert highlight="xhtml"
src="/richfaces/push/snippets/page.xhtml"/>
+ </p>
+ <p>
+ Code for registration of listener:
+ <rich:insert highlight="java"
src="/richfaces/push/snippets/listenerReg.java"/>
+ </p>
+ <p>
+ Component can get message using current code:
+ <rich:insert highlight="java"
src="/richfaces/push/snippets/listenermessage.java"/>
+ </p>
+ <p>
+ Thus, component 'push' uses asynchronous model instead of polls.
+ </p>
+ <ui:remove>
+ <div class="sample-container">
+ <ui:include src="/richfaces/push/examples/push.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/push/examples/push.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
+ </div>
+ </ui:remove>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml
(rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml 2007-09-03 14:59:31
UTC (rev 2717)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components -
Ajax Push</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/push/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="a4j/push"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>