[richfaces-svn-commits] JBoss Rich Faces SVN: r2281 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 10 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Aug 15 18:48:54 EDT 2007
Author: SergeySmirnov
Date: 2007-08-15 18:48:54 -0400 (Wed, 15 Aug 2007)
New Revision: 2281
Added:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_insert.gif
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/examples/ajaxSubmit.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/snippets/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/snippets/commandLinkProblem.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipBlock.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipsPanel.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/clickme.gif
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/cn_include.gif
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/images/cn_Include.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_jsFunction.gif
trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml
Log:
demo updates
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java 2007-08-15 22:20:20 UTC (rev 2280)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java 2007-08-15 22:48:54 UTC (rev 2281)
@@ -4,7 +4,10 @@
private Integer addent1;
private Integer addent2;
private Integer sum;
+ private String text1;
+ private String text2;
+
public Integer getSum() {
return sum;
}
@@ -27,5 +30,17 @@
sum = new Integer((addent1 != null ? addent1.intValue() : 0) + (addent2 != null ? addent2.intValue() : 0));
return null;
}
+ public String getText1() {
+ return text1;
+ }
+ public void setText1(String text1) {
+ this.text1 = text1;
+ }
+ public String getText2() {
+ return text2;
+ }
+ public void setText2(String text2) {
+ this.text2 = text2;
+ }
}
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-08-15 22:20:20 UTC (rev 2280)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-08-15 22:48:54 UTC (rev 2281)
@@ -37,6 +37,7 @@
message= richMisc, Message, /images/ico_common.gif, /images/cn_Message.gif, RichFacesComponentsLibrary.html#message, jbossrichfaces/freezone/docs/tlddoc/rich/message.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMessage.html, /richfaces/comingSoon.jsf
messages= richMisc, Messages, /images/ico_common.gif, /images/cn_Messages.gif, RichFacesComponentsLibrary.html#messages, jbossrichfaces/freezone/docs/tlddoc/rich/messages.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMessages.html, /richfaces/comingSoon.jsf
virtualEarth= richMisc, Virtual Earth, /images/ico_VirtualEarth.gif, /images/cn_VirtualEarth.gif, RichFacesComponentsLibrary.html#virtualEarth, jbossrichfaces/freezone/docs/tlddoc/rich/virtualEarth.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIVirtualEarth.html, /richfaces/comingSoon.jsf
+insert= richMisc, Insert, /images/ico_common.gif, /images/cn_insert.gif, RichFacesComponentsLibrary.html#insert, jbossrichfaces/freezone/docs/tlddoc/rich/insert.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInsert.html, /richfaces/insert.jsf
scrollableGrid= richDataIterators, Scrollable Data Grid, /images/ico_common.gif, /images/cn_ScrollableDataGrid.gif, RichFacesComponentsLibrary.html#scrollableGrid, jbossrichfaces/freezone/docs/tlddoc/rich/scrollableGrid, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIScrollableGrid.html, /richfaces/comingSoon.jsf
ajaxattributes= ajaxSupport, Ajax Attributes, /images/ico_common.gif, /images/cn_ajaxAttributes.gif, ArchitectureOverview.html, jbossajax4jsf/freezone/docs/tlddoc/overview-summary.html, jbossajax4jsf/freezone/docs/apidoc/overview-summary.html, /richfaces/ajaxAttributes.jsf
actionparam= ajaxSupport, Action Parameter, /images/ico_common.gif, /images/cn_actionParameter.gif, RichFacesComponentsLibrary.html#actionparam, jbossajax4jsf/freezone/docs/tlddoc/a4j/actionparam.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIActionParameter.html, /richfaces/actionparam.jsf
@@ -44,7 +45,7 @@
commandLink= ajaxSupport, Command Link, /images/ico_common.gif, /images/cn_commandLink.gif, RichFacesComponentsLibrary.html#commandLink, jbossajax4jsf/freezone/docs/tlddoc/a4j/commandLink.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxCommandLink.html, /richfaces/commandLink.jsf
form= ajaxSupport, Ajax Form, /images/ico_common.gif, /images/cn_ajaxForm.gif, RichFacesComponentsLibrary.html#form, jbossajax4jsf/freezone/docs/tlddoc/a4j/form.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxForm.html, /richfaces/form.jsf
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, JavaScript 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
+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
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
@@ -56,7 +57,7 @@
keepAlive= ajaxResources, Keep Alive, /images/ico_common.gif, /images/cn_KeepAlive.gif, RichFacesComponentsLibrary.html#keepAlive, jbossajax4jsf/freezone/docs/tlddoc/a4j/keepAlive.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.html, /richfaces/keepAlive.jsf
include= ajaxOutput, Include, /images/ico_common.gif, /images/cn_Include.gif, RichFacesComponentsLibrary.html#include, jbossajax4jsf/freezone/docs/tlddoc/a4j/include.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIInclude.html, /richfaces/comingSoon.jsf
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/comingSoon.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/comingSoon.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/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/comingSoon.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/comingSoon.jsf
Modified: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Include.gif
===================================================================
(Binary files differ)
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_insert.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_insert.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/samples/richfaces-demo/src/main/webapp/images/cn_jsFunction.gif
===================================================================
(Binary files differ)
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/examples/ajaxSubmit.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/examples/ajaxSubmit.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/examples/ajaxSubmit.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -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/insert/snippets/commandLinkProblem.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/snippets/commandLinkProblem.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/snippets/commandLinkProblem.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -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
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert/usage.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -0,0 +1,14 @@
+<!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.ajax4jsf.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+ <p>placeholder</p>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/insert.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -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 - Page Insert</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/insert/usage.xhtml"/>
+ </rich:tab>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -0,0 +1,75 @@
+<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 type="text/css">
+ .col {
+ width:50%;
+ padding:10px;
+ }
+ </style>
+
+ <rich:separator height="1" style="10px 0"/>
+
+ <h:panelGrid columns="2" width="100%" columnClasses="col">
+
+ <h:panelGroup>
+ This code does not work as expected. The expected echo text does not appear
+ below even the condition for <code>'renderer'</code> returns <code>true</code>.
+ Also, the error message does not appear when the length of the text reaches the limit.
+ </h:panelGroup>
+
+ <h:panelGroup>
+ This code works properly. The <code>h:message</code> is marked for update during
+ each Ajaxrequest/response. The place for bottom label is reserved with
+ <code>outputPanel</code> while the component is not rendered.
+ </h:panelGroup>
+
+ <a4j:outputPanel layout="block">
+
+ <h:message for="text1" style="color:red" />
+
+ <a4j:outputPanel layout="block">
+ <h:form>
+ <h:outputText value="Enter Text:"/>
+ <h:inputText id="text1" label="text1" value="#{rsBean.text1}">
+ <f:validateLength maximum="10"/>
+ <a4j:support event="onkeyup" reRender="out1" />
+ </h:inputText>
+ </h:form>
+ </a4j:outputPanel>
+
+ <h:outputText id="out1" rendered="#{not empty rsBean.text1}" value="Approved Text: #{rsBean.text2}" />
+
+ </a4j:outputPanel>
+
+
+
+ <a4j:outputPanel layout="block">
+
+ <a4j:outputPanel ajaxRendered="true">
+ <h:message for="text2" style="color:red" />
+ </a4j:outputPanel>
+
+ <a4j:outputPanel layout="block">
+ <h:form>
+ <h:outputText value="Enter Text:"/>
+ <h:inputText id="text2" label="text1" value="#{rsBean.text2}">
+ <f:validateLength maximum="10"/>
+ <a4j:support event="onkeyup" reRender="out2" />
+ </h:inputText>
+ </h:form>
+ </a4j:outputPanel>
+
+ <a4j:outputPanel layout="none">
+ <h:outputText id="out2" rendered="#{not empty rsBean.text2}" value="Approved Text: #{rsBean.text2}" />
+ </a4j:outputPanel>
+ </a4j:outputPanel>
+ </h:panelGrid>
+
+ <rich:separator height="1" style="10px 0"/>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -0,0 +1,47 @@
+<!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.ajax4jsf.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+
+ <p><code>a4j:outputPanel</code> is rendered as a <span> html element if the
+ <code>'layout'</code> attribute is equal <code>'inline'</code>
+ (default value) or as a <div> html element if <code>layout="block"</code>.
+ You can use this component for a layout purpose even the page has no Ajax functionality.
+ </p>
+ <p>In case of Ajax functionality presents on the page, the component offects two additional
+ features:
+ <ul>
+ <li>Marking the area of the page as automatically re-rendered on each Ajax request event
+ without a nessesity necessity to mentioned this area in the <code>reRender</code> attribute of Ajax
+ component. Attribute <code>ajaxRendered="true"</code> turn on this future. Note, that the effect of using
+ ajaxRendered="true" still might be overrided with limitToList attribute of the Ajax component
+ or <code>renderRegionOnly</code> attribute of the <code>a4j:region</code> component.</li>
+ <li>Marking the placeholder for any JSF component in case of it is not rendered due to
+ <code>rendered="false"</code>. This might be important when the component becomes rendered during the next
+ Ajax response. As soon as the placeholder is unknown, the rendered component will not appear
+ appear on the page. To turn on the feature of marking the placeholder you need to have the
+ attribute <code>layout="none"</code>.</li>
+ </ul>
+ </p>
+ <p>When <code>layout="none"</code>, the span <code>style="display:none"</code> is
+ rendered and assign the id of the child component if the component is not rendered.
+ Otherwize, it does not rendered at all.<br/>
+ The following example shows the cases of usage described above:</p>
+ <div class="sample-container" >
+
+ <ui:include src="/richfaces/outputPanel/examples/noneLayout.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/outputPanel/examples/noneLayout.xhtml"/>
+ </ui:include>
+
+ </div>
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -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 - Output Panel</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/outputPanel/usage.xhtml"/>
+ </rich:tab>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipBlock.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipBlock.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipBlock.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -0,0 +1,28 @@
+<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">
+
+
+
+ <f:subview>
+ <h:panelGrid styleClass="infopanel" cellpadding="0" cellspacing="0" columnClasses="col"
+ rowClasses="row1, row2,row3" border="0" columns="1">
+
+ <h:outputText value="#{tip}" />
+
+ <rich:separator height="1" />
+
+ <h:panelGrid columns="3">
+ <rich:toggleControl value="x Close" switchToState="closed" />
+ <rich:toggleControl switchToState="#{previous}" value="#{empty previous? '': '« Previous'}" />
+ <rich:toggleControl switchToState="#{next}" value="#{empty next? '': 'Next »'}" />
+ </h:panelGrid>
+
+ </h:panelGrid>
+ </f:subview>
+
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipsPanel.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipsPanel.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/examples/tipsPanel.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -0,0 +1,60 @@
+<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>
+
+ .infopanel { border:2px solid #{richSkin.panelBorderColor}; }
+ .row1 { height:60px; }
+ .row1 .col { padding:10px; }
+ .row2 { height:2px; }
+ .row3 { height:20px; }
+ .row3 .col {text-align:left; }
+ .col { }
+ </style>
+
+ <rich:togglePanel value="#{toggleBean.skinChooserState1}" switchType="client"
+ stateOrder="closed,tip1, tip2,tip3">
+
+ <f:facet name="closed">
+ <rich:toggleControl>
+ <h:graphicImage id="pic" style="border-width:0" value="/richfaces/togglePanel/picture/clickme.gif" />
+ </rich:toggleControl>
+ </f:facet>
+
+ <f:facet name="tip1">
+ <ui:include src="/richfaces/togglePanel/examples/tipBlock.xhtml">
+ <ui:param name="tip" value="rich:toggleControl might bre located inside of outside
+ of the rich:toogleControl it works for. In case of outside location, the control
+ attribute 'for' should refer to the toggle panel id."/>
+ <ui:param name="next" value="tip2"/>
+ </ui:include>
+ </f:facet>
+
+ <f:facet name="tip2">
+ <ui:include src="/richfaces/togglePanel/examples/tipBlock.xhtml">
+ <ui:param name="tip" value="Attribute initialState defines the first state appear
+ when the page is loaded. If this attribute is not specified, the first state
+ mentioned in the attribute stateOrder will be the first"/>
+ <ui:param name="previous" value="tip1"/>
+ <ui:param name="next" value="tip3"/>
+ </ui:include>
+ </f:facet>
+
+ <f:facet name="tip3">
+ <ui:include src="/richfaces/togglePanel/examples/tipBlock.xhtml">
+ <ui:param name="tip" value="Note that rich:toggleControl similar to
+ h:commandLink for 'server' mode and smilar to a4j:commandLink for 'ajax' mode.
+ Set immediate attribute to true if jsf form has other input field that might
+ cause the validation error. Otherwize, the state switched will not perform"/>
+ <ui:param name="previous" value="tip2"/>
+ </ui:include>
+ </f:facet>
+
+ </rich:togglePanel>
+
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/clickme.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/clickme.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/cn_include.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/picture/cn_include.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml 2007-08-15 22:20:20 UTC (rev 2280)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/togglePanel/usage.xhtml 2007-08-15 22:48:54 UTC (rev 2281)
@@ -7,78 +7,42 @@
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>
- Toggle Panel renders sequence of contents, tha can be switchet (toggled) by component called Toggle Control.
- </p>
- <ul>
- <li>Native support for Ajax operations</li>
- <li>Support for "ajax", "client" and "server" switch types</li>
- </ul>
- <h:form>
- <div class="sample-container" >
- <p>
- This is a simple example that contain two panels that can be switched. It is simplified version of elemet above on the screen that allows change of skin for this application.
- </p>
- <rich:togglePanel id="skin_chooser1" value="#{toggleBean.skinChooserState1}" switchType="ajax" stateOrder="s,b">
- <f:facet name="s">
- <h:panelGrid columns="1">
- <h:outputText value="BlueSky" />
- <h:outputText value="Classic" />
- <rich:toggleControl for="skin_chooser1" value="more »" />
- </h:panelGrid>
- </f:facet>
- <f:facet name="b">
- <h:panelGrid columns="1">
- <h:outputText value="BlueSky" />
- <h:outputText value="Classic" />
- <h:outputText value="Ruby" />
- <h:outputText value="Wine" />
- <h:outputText value="DeepMarine" />
- <h:outputText value="EmeraldTown" />
- <h:outputText value="Sakura" />
- <h:outputText value="Default" />
- <rich:toggleControl for="skin_chooser1" value="« less" />
- </h:panelGrid>
- </f:facet>
- </rich:togglePanel>
- </div>
- <div class="sample-container" >
- <p>
- This is another example, now it uses "server" switch type.
- </p>
- <rich:togglePanel id="skin_chooser2" value="#{toggleBean.skinChooserState3}" switchType="server" stateOrder="s,b">
- <f:facet name="s">
- <h:panelGrid columns="1">
- <h:outputText value="BlueSky" />
- <h:outputText value="Classic" />
- <rich:toggleControl for="skin_chooser2" value="more »" />
- </h:panelGrid>
- </f:facet>
- <f:facet name="b">
- <h:panelGrid columns="1">
- <h:outputText value="BlueSky" />
- <h:outputText value="Classic" />
- <h:outputText value="Ruby" />
- <h:outputText value="Wine" />
- <h:outputText value="DeepMarine" />
- <h:outputText value="EmeraldTown" />
- <h:outputText value="Sakura" />
- <h:outputText value="Default" />
- <rich:toggleControl for="skin_chooser2" value="« less" />
- </h:panelGrid>
- </f:facet>
- </rich:togglePanel>
- </div>
- </h:form>
- <p>
- Note how tree switched on "client" does not "remember" it state when whole page is reloaded. At the same time "ajax" tree remember it state without any additional code.
- </p>
+ <p>
+ Toggle Panel renders sequence of states, tha can be switched (toggled) by
+ component called Toggle Control. rich:togglePanel has no default appearance.
+ You can define it using the set of facets with any given content inside.
+ </p>
+ <p>
+ <b>switchType</b> attribute define the strategy of switching. The possible values for this attributes
+ are:
+ <ul>
+ <li>client - switching happens on the client without any request to the server.
+ The jsf form is not required in this mode</li>
+ <li>ajax - when state are switched, the content of new states comes from the server in Ajax way.</li>
+ <li>server - the whole page is reloaded when states are switched</li>
+ </ul>
+ </p>
+ <p>
+ <b>stateOrder</b> attribute defines the order of the states if "switchToState" attribute of
+ rich:toggleControl. The following example shows tips panel having one closed state and
+ three states for tips.
+ </p>
+
+
+ <div class="sample-container">
+
+ <ui:include src="/richfaces/togglePanel/examples/tipsPanel.xhtml"/>
+
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/togglePanel/examples/tipsPanel.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source"/>
+ </ui:include>
+
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/togglePanel/examples/tipBlock.xhtml"/>
+ <ui:param name="openlabel" value="View TipBlock.xhtml Source"/>
+ </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/togglePanel/source/usage.html" class="source_frame"/>
- </ui:define>
</ui:composition>
</html>
More information about the richfaces-svn-commits
mailing list