Author: SergeySmirnov
Date: 2007-07-26 17:34:35 -0400 (Thu, 26 Jul 2007)
New Revision: 1876
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.html
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
Log:
demo updates
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.html
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.html
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.html 2007-07-26
21:34:35 UTC (rev 1876)
@@ -0,0 +1 @@
+TODO: source should be added
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/source/usage.xhtml 2007-07-26
21:34:35 UTC (rev 1876)
@@ -0,0 +1 @@
+x
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml 2007-07-26
21:34:35 UTC (rev 1876)
@@ -0,0 +1,56 @@
+<!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/ajax"
+
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <p>
+ a4j:commandLink is similar to the standard h:commandLink, but produces an
+ Ajax request with further partial page update. 'reRender' attribute point to
the
+ component(s) that should be re-rendered in the component tree and updated
+ in the browser DOM after the ajax response is complete.
+ </p>
+
+ <p>
+ The following example shows how the greeting message is shown on the screen
+ without refreshing the entire page:
+ </p>
+
+ <div class="sample-container" >
+ <rich:separator width="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 width="1" style="padding-top:10px" />
+ </div>
+ <p>
+ For additional information about attributes of this compponent read
+ <h:outputLink
value="#{facesContext.externalContext.requestContextPath}/richfaces/ajaxAttributes.jsf?c=ajaxattributes">
+ <h:outputText value="'Ajax Attribute' section" />
+ </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/commandButton/source/usage.html"
class="source_frame"/>
+ </ui:define>
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink.xhtml
(rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink.xhtml 2007-07-26
21:34:35 UTC (rev 1876)
@@ -0,0 +1,17 @@
+<!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.ajax4jsf.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components -
Ajax Form</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server"
value="#{componentNavigator.activeTab}" styleClass="top_tab"
contentClass="content_tab" inactiveTabClass="inactive_tab"
activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/commandLink/usage.xhtml"/>
+ </rich:tab>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>