[richfaces-svn-commits] JBoss Rich Faces SVN: r2596 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 4 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Aug 29 20:26:19 EDT 2007


Author: SergeySmirnov
Date: 2007-08-29 20:26:18 -0400 (Wed, 29 Aug 2007)
New Revision: 2596

Added:
   trunk/samples/richfaces-demo/src/main/webapp/images/ajax/error.gif
   trunk/samples/richfaces-demo/src/main/webapp/images/ajax/passed.gif
   trunk/samples/richfaces-demo/src/main/webapp/richfaces/message.xhtml
   trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/
   trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/examples/
   trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/examples/form.xhtml
   trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/usage.xhtml
Modified:
   trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java
   trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
Log:
demo update. message has been added

Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java	2007-08-30 00:08:45 UTC (rev 2595)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java	2007-08-30 00:26:18 UTC (rev 2596)
@@ -7,6 +7,9 @@
 	private java.lang.Integer screenWidth;
 	private java.lang.Integer screenHeight;
 	private String job;
+	private String address;
+	private String city;
+	private String zip;
 	private Date date;
 	private boolean pollEnabled;
 	
@@ -71,5 +74,29 @@
 	public void setPollEnabled(boolean pollEnabled) {
 		this.pollEnabled = pollEnabled;
 	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getZip() {
+		return zip;
+	}
+
+	public void setZip(String zip) {
+		this.zip = zip;
+	}
 	
 }

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-30 00:08:45 UTC (rev 2595)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties	2007-08-30 00:26:18 UTC (rev 2596)
@@ -34,8 +34,8 @@
 menuItem=           richMenu,             Menu Item,            /images/ico_dropDownMenu.gif,           /images/cn_MenuItem.gif,                 RichFacesComponentsLibrary.html#menuItem,                                           jbossrichfaces/freezone/docs/tlddoc/rich/menuItem.html,           jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMenuItem.html,                   /richfaces/dropDownMenu.jsf
 menuSeparator=      richMenu,             Menu Separator,       /images/ico_dropDownMenu.gif,           /images/cn_MenuSeparator.gif,            RichFacesComponentsLibrary.html#menuSeparator,                                      jbossrichfaces/freezone/docs/tlddoc/rich/menuSeparator.html,      jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMenuSeparator.html,              /richfaces/dropDownMenu.jsf
 calendar=           richInputs,           Calendar,             /images/ico_common.gif,                 /images/cn_Calendar.gif,                 RichFacesComponentsLibrary.html#calendar,                                           jbossrichfaces/freezone/docs/tlddoc/rich/calendar.html,           jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UICalendar.html,                   /richfaces/calendar.jsf
-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
+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/message.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/messages.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
 scrollableDataTable= richDataIterators,   Scrollable Data Table, /images/ico_common.gif,                /images/cn_ScrollableDataTable.gif,      RichFacesComponentsLibrary.html#scrollableDataTable,                                jbossrichfaces/freezone/docs/tlddoc/rich/scrollableDataTable,     jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIscrollableDataTable.html,        /richfaces/scrollableDataTable.jsf

Added: trunk/samples/richfaces-demo/src/main/webapp/images/ajax/error.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ajax/error.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/richfaces-demo/src/main/webapp/images/ajax/passed.gif
===================================================================
(Binary files differ)


Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ajax/passed.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/examples/form.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/examples/form.xhtml	                        (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/examples/form.xhtml	2007-08-30 00:26:18 UTC (rev 2596)
@@ -0,0 +1,89 @@
+<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.org/rich">
+	
+		<style type="text/css">
+			.rich-message-marker img {
+				padding-right:7px;
+			}
+			.rich-message-label {
+				color:red;
+			}
+		</style>		
+			
+			
+		<rich:panel>
+			<f:facet name="header">
+				<h:outputText value="Form Validation. Using rich:message"/>
+			</f:facet>
+			
+			<h:form>
+				<h:panelGrid columns="3">
+					<h:outputText value="Name:" />
+					<h:inputText label="Name" id="name" required="true" value="#{userBean.name}">
+						<f:validateLength minimum="3"  />
+					</h:inputText>
+					<rich:message for="name">
+						<f:facet name="passedMarker">
+							<h:graphicImage  value="/images/ajax/passed.gif" />	
+						</f:facet>
+						<f:facet name="errorMarker">
+							<h:graphicImage value="/images/ajax/error.gif" />	
+						</f:facet>
+					</rich:message>
+					
+					<h:outputText value="Job:" />
+					<h:inputText label="Job" id="job" required="true" value="#{userBean.job}">
+						<f:validateLength minimum="3" maximum="50"  />
+					</h:inputText>
+					<rich:message for="job">
+						<f:facet name="passedMarker">
+							<h:graphicImage  value="/images/ajax/passed.gif" />	
+						</f:facet>
+						<f:facet name="errorMarker">
+							<h:graphicImage  value="/images/ajax/error.gif" />	
+						</f:facet>
+					</rich:message>
+					
+
+					
+					<h:outputText value="Address:" />
+					<h:inputText label="Address" id="address" required="true" value="#{userBean.address}">
+						<f:validateLength minimum="10" />
+					</h:inputText>
+					<rich:message for="address">
+						<f:facet name="passedMarker">
+							<h:graphicImage  value="/images/ajax/passed.gif" />	
+						</f:facet>
+						<f:facet name="errorMarker">
+							<h:graphicImage  value="/images/ajax/error.gif" />	
+						</f:facet>
+					</rich:message>
+					
+					<h:outputText value="Zip:" />
+					<h:inputText label="Zip" id="zip" required="true" value="#{userBean.zip}">
+						<f:validateLength minimum="4" maximum="9"  />
+					</h:inputText>
+					<rich:message for="zip">
+						<f:facet name="passedMarker">
+							<h:graphicImage  value="/images/ajax/passed.gif" />	
+						</f:facet>
+						<f:facet name="errorMarker">
+							<h:graphicImage value="/images/ajax/error.gif" />	
+						</f:facet>
+					</rich:message>
+					
+					<f:facet name="footer">
+						<a4j:commandButton value="Validate" />
+					</f:facet>
+					
+					
+				</h:panelGrid>
+			</h:form>
+		</rich:panel>
+	
+	
+</ui:composition>
\ No newline at end of file

Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/usage.xhtml	                        (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/message/usage.xhtml	2007-08-30 00:26:18 UTC (rev 2596)
@@ -0,0 +1,38 @@
+<!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>rich:message is an extention for standard h:message component. In addition to what the
+			standard conponent provides, rich:message:
+			<ul>
+				<li>does not required to be wraped with a4j:outputPanel to be rendered during the 
+				Ajax requests</li>
+				<li>allows to have a "passed" or "failed" marker before the text label</li>
+				<li>has a predefined css class names for different kind of message severities</li>
+			</ul> 
+			</p>
+			<p>The message marker is defined with facet. There are several facets names are available
+			to designate the marker for different kind of message severities. The following example
+			shows how the markers might be use to mark the "passed" and "failed" form fields.
+			Fill the form and click "Validate" button to see the entered data passes the
+			defined valudation rules.
+			</p>
+			<div class="sample-container" >
+
+				<ui:include src="/richfaces/message/examples/form.xhtml"/>
+				<ui:include src="/templates/include/sourceview.xhtml">
+					<ui:param name="sourcepath" value="/richfaces/message/examples/form.xhtml"/>
+				</ui:include>
+													
+			</div>
+		</ui:define>
+
+	</ui:composition>
+</html>

Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/message.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/message.xhtml	                        (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/message.xhtml	2007-08-30 00:26:18 UTC (rev 2596)
@@ -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 - Rich Message</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/message/usage.xhtml"/>
+			</rich:tab>			
+			<ui:include src="/templates/include/tagInfo.xhtml">
+				<ui:param name="path" value="rich/message"/>
+			</ui:include>		
+		</rich:tabPanel>
+	</ui:define>
+</ui:composition>
+</html>




More information about the richfaces-svn-commits mailing list