[richfaces-svn-commits] JBoss Rich Faces SVN: r15257 - in root/examples/trunk/richfaces-demo/src/main: java/org/richfaces/demo/common and 9 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Aug 21 11:02:06 EDT 2009


Author: ilya_shaikovsky
Date: 2009-08-21 11:02:05 -0400 (Fri, 21 Aug 2009)
New Revision: 15257

Added:
   root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/common/
   root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/common/UserBean.java
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/panel.css
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/panel_header.png
   root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/panel.xhtml
   root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status.xhtml
   root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/
   root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml
   root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/viewusage.xhtml
Modified:
   root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/push/ChoicesBean.java
   root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
Log:
continue rf-demo

Added: root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/common/UserBean.java
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/common/UserBean.java	                        (rev 0)
+++ root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/common/UserBean.java	2009-08-21 15:02:05 UTC (rev 15257)
@@ -0,0 +1,108 @@
+package org.richfaces.demo.common;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+ at ManagedBean(name = "userBean")
+ at SessionScoped
+public class UserBean {
+	private String name=""; 
+	private java.lang.Integer screenWidth;
+	private java.lang.Integer screenHeight;
+	private String job;
+	private String address;
+	private String city;
+	private String zip;
+	private Integer age; 
+
+	private String recordStatus;
+	public UserBean() {
+		super();
+	}
+	
+	public void store() {
+		this.recordStatus = "User " + this.name + " stored succesfully";
+	}
+	
+	public String getRecordStatus() {
+		return recordStatus;
+	}
+
+	public void setRecordStatus(String recordStatus) {
+		this.recordStatus = recordStatus;
+	}
+
+	public String getName() {
+		return this.name;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public java.lang.Integer getScreenWidth() {
+		return screenWidth;
+	}
+
+	public void setScreenWidth(java.lang.Integer screenWidth) {
+		this.screenWidth = screenWidth;
+	}
+
+	public java.lang.Integer getScreenHeight() {
+		return screenHeight;
+	}
+
+	public void setScreenHeight(java.lang.Integer screenHeight) {
+		this.screenHeight = screenHeight;
+	}
+	
+	public String nameItJohn() {
+		setName("John");
+		return null;
+	}
+	public String nameItMark() {
+		setName("Mark");
+		return null;
+	}
+
+	public String getJob() {
+		return job;
+	}
+
+	public void setJob(String job) {
+		this.job = job;
+	}
+
+	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;
+	}
+
+	public Integer getAge() {
+		return age;
+	}
+
+	public void setAge(Integer age) {
+		this.age = age;
+	}
+
+}

Modified: root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/push/ChoicesBean.java
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/push/ChoicesBean.java	2009-08-21 14:58:07 UTC (rev 15256)
+++ root/examples/trunk/richfaces-demo/src/main/java/org/richfaces/demo/push/ChoicesBean.java	2009-08-21 15:02:05 UTC (rev 15257)
@@ -125,6 +125,8 @@
 	}
 
 	public boolean isEnabled() {
+		System.out.println("ChoicesBean.isEnabled()");
+		System.out.println(enabled);
 		return enabled;
 	}
 

Added: root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/panel.css
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/panel.css	                        (rev 0)
+++ root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/panel.css	2009-08-21 15:02:05 UTC (rev 15257)
@@ -0,0 +1,26 @@
+.rich-panel{
+  border-width: 1px;
+ border-style: solid;
+ padding : 1px;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ background-color:#FFFFFF;
+ border-color:#BED6F8; 
+}
+   
+.rich-panel-header{
+ padding : 2px;
+ border-width: 1px;
+ border-style: solid;
+ background-color:#BED6F8;
+ border-color:#BED6F8;
+ font-weight:bold;   
+ background-position:left top;
+ background-repeat:repeat-x;
+ background-image: url(#{resource['rich/img/panel_header.png']})
+}
+ 
+.rich-panel-body{
+ padding : 10px;
+} 

Added: root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/panel_header.png
===================================================================
(Binary files differ)


Property changes on: root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/panel_header.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/panel.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/panel.xhtml	                        (rev 0)
+++ root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/panel.xhtml	2009-08-21 15:02:05 UTC (rev 15257)
@@ -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:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:c="http://java.sun.com/jsp/jstl/core"
+      xmlns:composite="http://java.sun.com/jsf/composite">
+ <head>
+  <title>panel</title>
+ </head>
+<body>
+ 
+<composite:interface>
+    <composite:attribute name="style" required="false"/>
+    <composite:attribute name="styleClass" required="false"/>
+    <composite:attribute name="headerClass" required="false"/>
+    <composite:attribute name="bodyClass" required="true"/>
+</composite:interface>
+ 
+<composite:implementation>
+    <h:outputStylesheet name="rich/css/panel.css" />
+  
+ <div class="rich-panel #{compositeComponent.attrs.styleClass}"
+   style="#{compositeComponent.attrs.style}"
+   onclick="#{compositeComponent.attrs.onclick}" 
+   ondblclick="#{compositeComponent.attrs.ondblclick}"
+   onkeydown="#{compositeComponent.attrs.onkeydown}"
+   onkeypress="#{compositeComponent.attrs.onkeypress}"
+   onkeyup="#{compositeComponent.attrs.onkeyup}"
+   onmousedown="#{compositeComponent.attrs.onmousedown}"
+   onmousemove="#{compositeComponent.attrs.onmousemove}"
+   onmouseout="#{compositeComponent.attrs.onmouseout}"
+   onmouseover="#{compositeComponent.attrs.onmouseover}"
+   onmouseup="#{compositeComponent.attrs.onmouseup}">
+
+   <h:panelGroup rendered="#{not empty cc.facets.header}">
+   <div class="rich-panel-header #{compositeComponent.attrs.headerClass}">
+     <composite:renderFacet name="header"/>
+   </div>      
+   </h:panelGroup>   
+  <div class="rich-panel-body #{compositeComponent.attrs.bodyClass}" > 
+   <composite:insertChildren /> 
+  </div>   
+ 
+ </div> 
+</composite:implementation>
+</body>
+</html>

Modified: root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml	2009-08-21 14:58:07 UTC (rev 15256)
+++ root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml	2009-08-21 15:02:05 UTC (rev 15257)
@@ -9,7 +9,7 @@
 	<h:form>
 		<h:dataTable value="#{choicesBean.choices}" var="choice" id="choiceVotes">
 			<f:facet name="header">
-				<h:outputText value="Voting for favourite fruit" />
+				<h:outputText value="Voting for favorite fruit" />
 			</f:facet>
 			<h:column>
 				<f:facet name="header">
@@ -39,8 +39,8 @@
 		</a4j:outputPanel>
 
 		<a4j:push enabled="#{choicesBean.enabled}" interval="3000"
-			eventProducer="#{choicesBean.addListener}" id="push">
-			<f:ajax render="choiceVotes push tempResults" action="#{choicesBean.processUpdates}"/> 
+			eventProducer="#{choicesBean.addListener}" id="push" action="#{choicesBean.processUpdates}">
+			<f:ajax render="choiceVotes push tempResults" /> 
 		</a4j:push> 
 	</h:form>
 </ui:composition>

Added: root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml	                        (rev 0)
+++ root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml	2009-08-21 15:02:05 UTC (rev 15257)
@@ -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:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:rich="http://java.sun.com/jsf/composite/rich"
+      xmlns:a4j="http://richfaces.org/a4j">
+
+	<ui:composition>
+		<h:form>
+		<rich:panel id="psnel">
+			<f:facet name="header">
+				<h:outputText value="Panel with status" />
+			</f:facet>
+			<h:panelGrid columns="2">
+			<h:panelGrid columns="2">
+				<f:ajax event="keyup">
+					<h:outputText value="User name:" />
+					<h:inputText value="#{userBean.name}"/>
+					<h:outputText value="Adress:" />
+					<h:inputText value="#{userBean.address}"/>
+				</f:ajax>
+			</h:panelGrid>
+			<a4j:status>
+				<f:facet name="start">
+					<h:graphicImage value="/images/ai.gif"/>
+				</f:facet>
+			</a4j:status>
+			</h:panelGrid>
+			<h:commandButton value="Submit" type="button" action="#{userBean.store}">
+				<f:ajax render="out"/>
+			</h:commandButton> 
+			<h:outputText value="#{userBean.recordStatus}" id="out"/>
+		</rich:panel>
+		</h:form>
+	</ui:composition>
+
+</html>
\ No newline at end of file

Added: root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/viewusage.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/viewusage.xhtml	                        (rev 0)
+++ root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status/viewusage.xhtml	2009-08-21 15:02:05 UTC (rev 15257)
@@ -0,0 +1,48 @@
+<!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:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:rich="http://java.sun.com/jsf/composite/rich"
+      xmlns:a4j="http://richfaces.org/a4j">
+
+	<ui:composition>
+		<h:panelGrid columns="3">
+		<h:form>
+		<rich:panel id="psnel">
+			<f:facet name="header">
+				<h:outputText value="User Details Panel" />
+			</f:facet>
+			<h:panelGrid columns="2">
+				<f:ajax event="keyup">
+					<h:outputText value="User name:" />
+					<h:inputText value="#{userBean.name}"/>
+					<h:outputText value="Adress:" />
+					<h:inputText value="#{userBean.address}"/>
+				</f:ajax>
+			</h:panelGrid>
+			<h:commandButton value="Submit" type="button" action="#{userBean.store}">
+				<f:ajax render="out"/>
+			</h:commandButton> 
+			<h:outputText value="#{userBean.recordStatus}" id="out"/>
+		</rich:panel>
+		</h:form>
+		<h:form>
+			<rich:panel>
+				<f:facet name="header">
+					<h:outputText value="Simple search panel" />
+				</f:facet>
+				<h:inputText value="Search..."/>
+				<h:commandButton value="Submit" type="button">
+					<f:ajax />
+				</h:commandButton> 
+			</rich:panel>
+		</h:form>
+		<a4j:status>
+			<f:facet name="start">
+				<h:graphicImage value="/images/ai.gif"/>
+			</f:facet>
+		</a4j:status>
+		</h:panelGrid>
+	</ui:composition>
+</html>
\ No newline at end of file

Added: root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status.xhtml	                        (rev 0)
+++ root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/status.xhtml	2009-08-21 15:02:05 UTC (rev 15257)
@@ -0,0 +1,27 @@
+<!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:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets">
+
+	<ui:composition template="/templates/main.xhtml">
+	<ui:define name="body">
+		<p>
+			Description for Status goes there.
+		</p>
+		<fieldset>
+			<legend>Default form status sample</legend>
+			<ui:include src="/richfaces/status/usage.xhtml" />
+		</fieldset>
+		<fieldset>
+			<legend>Default view status sample</legend>
+			<ui:include src="/richfaces/status/viewusage.xhtml" />
+		</fieldset>
+		<fieldset>
+			<legend>Referenced status sample</legend>
+			TO DO. (Awaiting for component functionality)
+		</fieldset>
+	</ui:define>		
+	</ui:composition>
+
+</html>
\ No newline at end of file



More information about the richfaces-svn-commits mailing list