[corejsf~subversion:165] ...
- From: cayhorstmann@kenai.com
- To: commits@corejsf.kenai.com
- Subject: [corejsf~subversion:165] ...
- Date: Tue, 2 Feb 2010 04:53:15 +0000
Project: corejsf
Repository: subversion
Revision: 165
Author: cayhorstmann
Date: 2010-02-02 04:53:05 UTC
Link:
Log Message:
------------
...
Revisions:
----------
165
Added Paths:
------------
ch09/simple-composite/src/java/com/corejsf/UserBean.java
ch09/simple-composite/web/WEB-INF/sun-web.xml
ch09/simple-composite/web/index.xhtml
ch09/simple-composite/web/resources/util
ch09/simple-composite/web/WEB-INF/web.xml
ch09/simple-composite/web/WEB-INF
ch09/simple-composite/web/resources
ch09/simple-composite/web
ch09/simple-composite
ch09/simple-composite/src
ch09/simple-composite/web/welcome.xhtml
ch09/simple-composite/web/resources/util/debug.xhtml
ch09/simple-composite/src/java/com
ch09/simple-composite/src/java/com/corejsf
ch09/simple-composite/src/java
ch09/simple-composite/web/WEB-INF/beans.xml
Diffs:
------
Index: ch09/simple-composite/src/java/com/corejsf/UserBean.java
===================================================================
--- ch09/simple-composite/src/java/com/corejsf/UserBean.java (revision 0)
+++ ch09/simple-composite/src/java/com/corejsf/UserBean.java (revision 165)
@@ -0,0 +1,20 @@
+package com.corejsf;
+
+import java.io.Serializable;
+import javax.inject.Named;
+ // or import javax.faces.bean.ManagedBean;
+import javax.enterprise.context.SessionScoped;
+ // or import javax.faces.bean.SessionScoped;
+
+@Named("user") // or @ManagedBean(name="user")
+@SessionScoped
+public class UserBean implements Serializable {
+ private String name;
+ private String password;
+
+ public String getName() { return name; }
+ public void setName(String newValue) { name = newValue; }
+
+ public String getPassword() { return password; }
+ public void setPassword(String newValue) { password = newValue; }
+}
Index: ch09/simple-composite/web/index.xhtml
===================================================================
--- ch09/simple-composite/web/index.xhtml (revision 0)
+++ ch09/simple-composite/web/index.xhtml (revision 165)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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:util="http://java.sun.com/jsf/composite/util">
+ <h:head>
+ <title>Welcome</title>
+ </h:head>
+ <h:body>
+ <h:form>
+ <h3>Please enter your name and password.</h3>
+ <table>
+ <tr>
+ <td>Name:</td>
+ <td><h:inputText value="#{user.name}"/></td>
+ </tr>
+ <tr>
+ <td>Password:</td>
+ <td><h:inputSecret value="#{user.password}"/></td>
+ </tr>
+ </table>
+ <p><h:commandButton value="Login" action="welcome"/></p>
+ </h:form>
+ <div style="color: red;">
+ <util:debug />
+ </div>
+ </h:body>
+</html>
\ No newline at end of file
Index: ch09/simple-composite/web/welcome.xhtml
===================================================================
--- ch09/simple-composite/web/welcome.xhtml (revision 0)
+++ ch09/simple-composite/web/welcome.xhtml (revision 165)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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">
+ <h:head>
+ <title>Welcome</title>
+ </h:head>
+ <h:body>
+ <h3>Welcome to JavaServer Faces, #{user.name}!</h3>
+ </h:body>
+</html>
\ No newline at end of file
Index: ch09/simple-composite/web/WEB-INF/sun-web.xml
===================================================================
--- ch09/simple-composite/web/WEB-INF/sun-web.xml (revision 0)
+++ ch09/simple-composite/web/WEB-INF/sun-web.xml (revision 165)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application
Server 9.0 Servlet 2.5//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app error-url="">
+ <context-root>/simple-composite</context-root>
+ <class-loader delegate="true"/>
+ <jsp-config>
+ <property name="keepgenerated" value="true">
+ <description>Keep a copy of the generated servlet class' java
code.</description>
+ </property>
+ </jsp-config>
+</sun-web-app>
Index: ch09/simple-composite/web/WEB-INF/beans.xml
===================================================================
Index: ch09/simple-composite/web/WEB-INF/web.xml
===================================================================
--- ch09/simple-composite/web/WEB-INF/web.xml (revision 0)
+++ ch09/simple-composite/web/WEB-INF/web.xml (revision 165)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>faces/index.xhtml</welcome-file>
+ </welcome-file-list>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+</web-app>
\ No newline at end of file
Index: ch09/simple-composite/web/resources/util/debug.xhtml
===================================================================
--- ch09/simple-composite/web/resources/util/debug.xhtml (revision 0)
+++ ch09/simple-composite/web/resources/util/debug.xhtml (revision 165)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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:composite="http://java.sun.com/jsf/composite">
+
+ <composite:interface/>
+
+ <composite:implementation>
+ <div style="font-size: 1.2em; font-style: italic">
+ Request header:
+ </div>
+
+ <p>#{header}</p>
+
+ <div style="font-size: 1.2em; font-style: italic">
+ Request parameters:
+ </div>
+
+ <p>#{param}</p>
+ </composite:implementation>
+</html>
|
[corejsf~subversion:165] ... |
cayhorstmann | 02/02/2010 |





