[jboss-cvs] JBossAS SVN: r95715 - projects/docs/enterprise/5.0/Getting_Started_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 28 20:14:48 EDT 2009


Author: laubai
Date: 2009-10-28 20:14:48 -0400 (Wed, 28 Oct 2009)
New Revision: 95715

Removed:
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml
Modified:
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml
   projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml
Log:
Removed Sample JSF-EJB3 Application and Using Seam chapters; these examples are not shipped with EAP.

Modified: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Book_Info.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -6,7 +6,7 @@
 	<title>Getting Started Guide</title>
 	<subtitle>for Use with JBoss Enterprise Application Platform 5.0</subtitle>
 	<edition>1.0</edition>
-	<pubsnumber>29</pubsnumber>
+	<pubsnumber>30</pubsnumber>
 	<productname>JBoss Enterprise Application Platform</productname>
 	<productnumber>5.0</productnumber>
 	<!--<pubdate>, 2009</pubdate> -->

Modified: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/EJB3_Caveats.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -11,7 +11,7 @@
 		There are a number of implementation features that you should be aware of when developing applications for JBoss Enterprise Application Platform 5.0. 
 	</para>
 	
-	<section>
+	<!--<section>
 		<title>
 			Further Release Information
 		</title>
@@ -19,7 +19,7 @@
 		<para>
       The Release Notes for JBoss Enterprise Application Platform may contain updated information on new and modified features. The Release Notes also include links to issues in JIRA for issue details and information about workarounds.
 		</para>
-	</section>
+	</section>-->
 			
 			
 	<section id="EJB3_Support">

Modified: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Getting_Started_Guide.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -9,8 +9,8 @@
 	<xi:include href="The_JBoss_Server_A_Quick_Tour.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 	<xi:include href="EJB3_Caveats.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 	<xi:include href="About_the_Example_Applications.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-	<xi:include href="Sample_JSF_EJB3_Application.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-	<xi:include href="Using_Seam.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<!--<xi:include href="Sample_JSF_EJB3_Application.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+	<xi:include href="Using_Seam.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
 	<xi:include href="Using_Other_Databases.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 <!--	<xi:include href="Appendix2.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
 	<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Revision_History.xml"/>

Modified: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Revision_History.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -4,6 +4,25 @@
 
 <appendix id="appe-Publican-Revision_History">
 	<title>Revision History</title>
+        <simpara>
+                <revhistory>
+                        <revision>
+                                <revnumber>1.1</revnumber>
+                                <date>Tue Oct 27 2009</date>
+                                <author>
+                                        <firstname>Laura</firstname>
+                                        <surname>Bailey</surname>
+                                        <email>lbailey at redhat.com</email>
+                                </author>
+                                <revdescription>
+                                        <simplelist>
+                                                <member>Added corrections for 
+JBPAPP-2960.</member>
+                                        </simplelist>
+                                </revdescription>
+                        </revision>
+                </revhistory>
+        </simpara>
 	<simpara>
 		<revhistory>
 			<revision>

Deleted: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Sample_JSF_EJB3_Application.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -1,562 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-]>
-<chapter id="Sample_JSF_EJB3_Application">
-	<title>Sample JSF-EJB3 Application</title>
-	<para>
-		We use a simple <emphasis>TODO</emphasis> application to show how JSF and EJB3 work together in a web application. The <emphasis>TODO</emphasis> application works like this, you can create a new <emphasis>todo</emphasis> task item using the <emphasis>Create</emphasis> web form. Each <emphasis>todo</emphasis> item has a <emphasis>title</emphasis> and a <emphasis>description</emphasis>. When you submit the form, the application saves your task to a relational database. Using the application, you can view all <emphasis>todo</emphasis> items, edit and existing <emphasis>todo</emphasis> item, delete an existing <emphasis>todo</emphasis> item and update the task in the database.
-	</para>
-	<para>
-		The sample application comprises the following components:
-		<itemizedlist>
-			<listitem>
-				<para>
-					Entity objects - These objects represent the data model; the properties in the object are mapped to column values in relational database tables.
-				</para>
-			</listitem>
-			<listitem>
-				<para>
-					JSF web pages - The web interface used to capture input data and display result data. The data fields on these web pages are mapped to the data model via the JSF Expression Language (EL).
-				</para>
-			</listitem>
-			<listitem>
-				<para>
-					EJB3 Session Bean - This is where the functionality is implemented. We make use of a Stateless Session Bean.
-				</para>
-			</listitem>
-		</itemizedlist>
-	</para>
-	<section id="Sample_JSF_EJB3_Application-Data_Model">
-		<title>Data Model</title>
-		<para>
-			Let's take a look at the contents of the Data Model represented by the <literal>Todo</literal> class in the <literal>Todo.java</literal> file. Each instance of the <literal>Todo</literal> class corresponds to a row in the relational database table. The <literal>Todo</literal> class has three properties: <property>ID</property>, <property>title</property> and <property>description</property>. Each of these correspond to a column in the database table.
-		</para>
-		<para>
-			 The <emphasis>Entity class</emphasis> to <emphasis>Database Table</emphasis> mapping information is specified using EJB3 Annotations in the <literal>Todo</literal> class. This eliminates the need for XML configuration and makes it a lot clearer. The <literal>@Entity</literal> annotation defines the <literal>Todo</literal> class as an Entity Bean. The <literal>@Id</literal> and <literal>@GeneratedValue</literal> annotations on the <literal>id</literal> property indicate that the <literal>id</literal> column is the primary key and that the server automatically generates its value for each <literal>Todo</literal> object saved into the database.  
-		</para>
-		<para>
-<programlisting>
- at Entity
-public class Todo implements Serializable {
-
-  private long id;
-  private String title;
-  private String description;
-
-  public Todo () {
-    title ="";
-    description ="";
-  }
-
-  @Id @GeneratedValue
-  public long getId() { return id;}
-  public void setId(long id) { this.id = id; }
-
-  public String getTitle() { return title; }
-  public void setTitle(String title) {this.title = title;}
-
-  public String getDescription() { return description; }
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-}
-</programlisting>
-		</para>
-	</section>
-	<section id="Sample_JSF_EJB3_Application-JSF_Web_Pages">
-		<title>JSF Web Pages</title>
-		<para>
-			In this section we will show you how the web interface is defined using JSF pages. We will also see how the data model is mapped to the web form using JSF EL. Using the <code>#{...}</code> notation to reference Java objects is called <emphasis role="bold">JSF EL</emphasis> (JSF Expression Language). Lets take a look at the pages used in our application:
-			<itemizedlist>
-				<listitem>
-					<para>
-						<filename>index.xhtml</filename>: This page displays two options: 1. Create New Todo 2. Show all Todos. When you click on the Submit button the corresponding action is invoked. 
-					</para>
-					<para>
-<programlisting>
-&lt;h:form&gt;
-&lt;ul&gt;
-  &lt;li&gt;&lt;h:commandLink type="submit" value="Create New Todo" action="create"/&gt;&lt;/li&gt;
-  &lt;li&gt;&lt;h:commandLink type="submit" value="Show All Todos" action="todos"/&gt;&lt;/li&gt;
-&lt;/ul&gt;
-&lt;/h:form&gt;
-</programlisting>
-					</para>
-				</listitem>
-				<listitem>
-					<para>
-						<emphasis role="bold">create.xhtml</emphasis>: When you try to create a new task, this JSF page captures the input data. We use the <literal>todoBean</literal> to back the form input text fields. The #{todoBean.todo.title} symbol refers to the "title" property of the "todo" object in the "TodoBean" class. The #{todoBean.todo.description} symbol refers to the "description" property of the "todo" object in the "TodoBean" class.  The #{todoBean.persist} symbol refers to the "persist" method in the "TodoBean" class. This method creates the "Todo" instance with the input data (title and description) and persists the data.
-					</para>
-					
-<programlisting role="xml">
-&lt;h:form id="create"&gt;
-&lt;table&gt;
-  &lt;tr&gt;
-    &lt;td&gt;Title:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;h:inputText id="title" value="#{todoBean.todo.title}" size="15"&gt;
-        &lt;f:validateLength minimum="2"/&gt;
-      &lt;/h:inputText&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-  &lt;tr&gt;
-    &lt;td&gt;Description:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;h:inputTextarea id="description" value="#{todoBean.todo.description}"&gt;
-        &lt;f:validateLength minimum="2" maximum="250"/&gt;
-      &lt;/h:inputTextarea&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-&lt;/table&gt;
-&lt;h:commandButton type="submit" id="create" value="Create"
-                 action="#{todoBean.persist}"/&gt;
-&lt;/h:form&gt;
-</programlisting>
-
-<para>
-	<xref linkend="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_create_todo"/> shows the "Create Todo" web page with the input fields mapped to the data model.
-					</para>
-					<figure id="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_create_todo">
-						<title>The "Create Todo" web page </title>
-						<mediaobject>
-							<imageobject>
-								<imagedata align="center" fileref="images/jsfejb3_create_todo.png"/>
-							</imageobject>
-						</mediaobject>
-					</figure>
-				</listitem>
-				<listitem>
-					<para>
-						<emphasis role="bold">todos.xhtml</emphasis>: This page displays the list of all "todos" created. There is also an option to choose a "todo" item for 'edit' or 'delete'.
-					</para>
-					<para>
-						 The list of all 'todos' is fetched by #{todoBean.todos} symbol referring to the 'getTodos()' property in the 'TodoBean' class. The JSF <literal>dataTable</literal> iterates through the list and displays each <literal>Todo</literal> object in a row. The 'Edit' option is available across each row. The #{todo.id} symbol represents the "id" property of the "todo" object.
-					</para>
-					<para>
-<programlisting>
-&lt;h:form&gt;
-&lt;h:dataTable value="#{todoBean.todos}" var="todo"&gt;
-  &lt;h:column&gt;
-    &lt;f:facet name="header"&gt;Title&lt;/f:facet&gt;
-    #{todo.title}
-  &lt;/h:column&gt;
-  &lt;h:column&gt;
-    &lt;f:facet name="header"&gt;Description&lt;/f:facet&gt;
-    #{todo.description}
-  &lt;/h:column&gt;
-  &lt;h:column&gt;
-    &lt;a href="edit.faces?tid=#{todo.id}"&gt;Edit&lt;/a&gt;
-  &lt;/h:column&gt;
-&lt;/h:dataTable&gt;
-&lt;center&gt;
-  &lt;h:commandButton action="create"
-            value="Create New Todo" type="submit"/&gt;
-&lt;/center&gt;
-&lt;/h:form&gt;
-</programlisting>
-					<xref linkend="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_todos"/> shows the "Show All Todos" web page with the data fields mapped to the data model.
-					</para>
-					<figure id="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_todos">
-						<title>The "Show All Todos" web page </title>
-						<mediaobject>
-							<imageobject>
-								<imagedata align="center" fileref="images/jsfejb3_todos.png"/>
-							</imageobject>
-						</mediaobject>
-					</figure>
-				</listitem>
-				<listitem>
-					<para>
-						<emphasis role="bold">edit.xhtml</emphasis>: This page allows you to edit the "todo" item's 'title' and 'description' properties. The #{todoBean.update} and #{todoBean.delete} symbols represent the "update" and "delete" methods in the "TodoBean" class.
-					</para>
-					
-<programlisting role="xml">
-&lt;h2&gt;Edit #{todoBean.todo.title}&lt;/h2&gt;
-&lt;h:form id="edit"&gt;
-&lt;input type="hidden" name="tid" value="#{todoBean.todo.id}"/&gt;
-&lt;table&gt;
-  &lt;tr&gt;
-    &lt;td&gt;Title:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;h:inputText id="title" value="#{todoBean.todo.title}" size="15"&gt;
-        &lt;f:validateLength minimum="2"/&gt;
-      &lt;/h:inputText&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-  &lt;tr&gt;
-    &lt;td&gt;Description:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;h:inputTextarea id="description" value="#{todoBean.todo.description}"&gt;
-        &lt;f:validateLength minimum="2" maximum="250"/&gt;
-      &lt;/h:inputTextarea&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-&lt;/table&gt;
-&lt;h:commandButton type="submit" id="update" value="Update"
-                 action="#{todoBean.update}"/&gt;
-&lt;h:commandButton type="submit" id="delete" value="Delete"
-                 action="#{todoBean.delete}"/&gt;
-&lt;/h:form&gt;
-</programlisting>
-<para>
-					<xref linkend="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_edit_todo"/> shows the "Edit Todo" web page with the mapping to the data model.
-					</para>
-					<figure id="Sample_JSF_EJB3_Application-JSF_Web_Pages-jsfejb3_edit_todo">
-						<title>The "Edit Todo" web page </title>
-						<mediaobject>
-							<imageobject>
-								<imagedata align="center" fileref="images/jsfejb3_edit_todo.png"/>
-							</imageobject>
-						</mediaobject>
-					</figure>
-				</listitem>
-			</itemizedlist>
-		</para>
-		<note>
-			<para>
-				We have used XHTML pages in the sample applications because we recommend using Facelets instead of JSP to render JSF view pages.
-			</para>
-		</note>
-	</section>
-	<section id="Sample_JSF_EJB3_Application-EJB3_Session_Beans">
-		<title>EJB3 Session Beans</title>
-		<para>
-			EJB 3.0 is one of the major improvements introduced with Java EE 5.0. It aims at reducing the complexity of older versions of EJB and simplifies Enterprise Java development and deployment. You will notice that to declare a class as a 'Session Bean' you simply have to annotate it. Using annotations eliminates the complexity involved with too many deployment descriptors. Also the only interface an EJB3 Session Bean requires is a business interface that declares all the business methods that must be implemented by the bean. 
-		</para>
-		<para>
-			We will explore the two important source files associated with the Bean implementation in our application: <literal>TodoDaoInt.java</literal> and <literal>TodoDao.java</literal>.
-			<itemizedlist>
-				<listitem>
-					<para>
-						<emphasis role="bold">Business interface</emphasis>: <literal>TodoDaoInt.java</literal>
-					</para>
-					<para>We define here the methods that need to be implemented by the bean implementation class. Basically, the business methods that will be used in our application are defined here.
-						
-<programlisting role="JAVA">
-public interface TodoDaoInt {
-
-  public void persist (Todo todo);
-  public void delete (Todo todo);
-  public void update (Todo todo);
-
-  public List &lt;Todo&gt; findTodos ();
-  public Todo findTodo (String id);
-}
-</programlisting>
-					</para>
-				</listitem>
-				<listitem>
-					<para>
-						<emphasis role="bold">Stateless Session Bean</emphasis>: <literal>TodoDao.java</literal>
-					</para>
-					<para>
-						The <literal>@Stateless</literal> annotation marks the bean as a stateless session bean. In this class, we need to access the Entity bean <literal>Todo</literal> defined earlier. For this we need an <literal>EntityManager</literal>. The <literal>@PersistenceContext</literal> annotation tells the JBoss Server to inject an entity manager during deployment.
-<programlisting>
- at Stateless
-public class TodoDao implements TodoDaoInt {
-
-  @PersistenceContext
-  private EntityManager em;
-
-  public void persist (Todo todo) {
-    em.persist (todo);
-  }
-
-  public void delete (Todo todo) {
-    Todo t = em.merge (todo);
-    em.remove( t );
-  }
-
-  public void update (Todo todo) {
-    em.merge (todo);
-  }
-
-  public List &lt;Todo&gt; findTodos () {
-    return (List &lt;Todo&gt;) em.createQuery("select t from Todo t")
-                                  .getResultList();
-  }
-
-  public Todo findTodo (String id) {
-    return (Todo) em.find(Todo.class, Long.parseLong(id));
-  }
-
-}
-</programlisting>
-					</para>
-				</listitem>
-			</itemizedlist>
-		</para>
-	</section>
-	<section id="Sample_JSF_EJB3_Application-Configuration_and_Packaging">
-		<title>Configuration and Packaging</title>
-		<para>
-			We will build the sample application using Ant and explore the configuration and packaging details. Please install Ant if currently not installed on your computer.
-		</para>
-		<section id="Building_The_Application">
-			<title>Building The Application</title>
-			<para>Let's look at building the example application and then explore the configuration files in detail.
-			</para>
-			<para>
-				In <xref linkend="About_the_Example_Applications"/>, we looked at the directory structure of the <literal>jsfejb3</literal> sample application. At the command line, go to the <literal>jsfejb3</literal> directory. There you will see a <literal>build.xml</literal> file. This is our Ant build script for compiling and packaging the archives. To build the application, you need to first of all edit the <literal>build.xml</literal> file and set the <varname>JBOSS_HOME</varname> environment property to reflect the location where the JBoss Enterprise Application Platform server is installed. Once you have done this, just type the command <literal>ant</literal> and your output should look like this:
-			</para>
-<screen>[user at localhost jsfejb3]$ ant
-Buildfile: build.xml
-
-compile:
-    [mkdir] Created dir: /jboss/gettingstarted/jsfejb3/build/classes
-    [javac] Compiling 4 source files to /home/user/Desktop/gettingstarted/jsfejb3/build/classes
-    [javac] Note: /jboss/gettingstarted/jsfejb3/src/TodoDao.java uses unchecked or unsafe operations.
-    [javac] Note: Recompile with -Xlint:unchecked for details.
-
-war:
-    [mkdir] Created dir: /jboss/gettingstarted/jsfejb3/build/jars
-      [war] Building war: /jboss/gettingstarted/jsfejb3/build/jars/app.war
-
-ejb3jar:
-      [jar] Building jar: /jboss/gettingstarted/jsfejb3/build/jars/app.jar
-
-ear:
-      [ear] Building ear: /jboss/gettingstarted/jsfejb3/build/jars/jsfejb3.ear
-
-main:
-
-BUILD SUCCESSFUL
-Total time: 3 seconds
-
-</screen>
-			<para>
-				If you get the BUILD SUCCESSFUL message, you will find a newly created <literal>build</literal> directory with 2 sub-directories in it: <itemizedlist>
-					<listitem>
-						<para>
-							<emphasis role="bold">classes</emphasis>: containing the compiled class files.
-						</para>
-					</listitem>
-					<listitem>
-						<para>
-							<emphasis role="bold">jars</emphasis>: containing three archives - <literal>app.jar</literal>, <literal>app.war</literal> and <literal>jsfejb3.ear</literal>. <itemizedlist>
-								<listitem>
-									<para>
-										<filename>app.jar</filename>: EJB code and descriptors.
-									</para>
-								</listitem>
-								<listitem>
-									<para>
-										<filename>app.war</filename>: web application which provides the front end to allow users to interact with the business components (the EJBs). The web source (HTML, images etc.) contained in the <literal>jsfejb3/view</literal> directory is added unmodified to this archive. The Ant task also adds the <literal>WEB-INF</literal> directory that contains the files which aren’t meant to be directly accessed by a web browser but are still part of the web application. These include the deployment descriptors (<literal>web.xml</literal>) and extra jars required by the web application.
-									</para>
-								</listitem>
-								<listitem>
-									<para>
-										<filename>jsfejb3.ear</filename>: The EAR file is the complete application, containing the EJB modules and the web module. It also contains an additional descriptor, <literal>application.xml</literal>. It is also possible to deploy EJBs and web application modules individually but the EAR provides a convenient single unit.
-									</para>
-								</listitem>
-							</itemizedlist>
-						</para>
-					</listitem>
-				</itemizedlist>
-			</para>
-		</section>
-		<section id="Configuration_Files">
-			<title>Configuration Files</title>
-			<para>
-				Now that we have built the application, lets take a closer look at some of the important Configuration files. We have built the final archive ready for deployment - <literal>jsfejb3.ear</literal>. The contents of your EAR file should look like this:	
-			</para>
-<programlisting>
-jsfejb3.ear
-|+ app.jar   // contains the EJB code
-    |+ import.sql
-    |+ Todo.class
-    |+ TodoDao.class
-    |+ TodoDaoInt.class
-    |+ META-INF
-        |+ persistence.xml
-|+ app.war   // contains web UI
-    |+ index.html
-    |+ index.xhtml
-    |+ create.xhtml
-    |+ edit.xhtml
-    |+ todos.xhtml
-    |+ TodoBean.class
-    |+ style.css
-    |+ META-INF
-    |+ WEB-INF
-       |+ faces-config.xml
-       |+ navigation.xml
-       |+ web.xml
-|+ META-INF  // contains the descriptors
-    |+ application.xml
-    |+ jboss-app.xml
-</programlisting>
-			<itemizedlist>
-				<listitem>
-					<para>
-						<literal>application.xml</literal>: This file lists the JAR files in the EAR (in our case <literal>app.jar</literal>) and tells the JBoss server what files to look for and where. The root URL for the application is also specified in this file as 'context-root'.
-<programlisting>
-&lt;application&gt;
-  &lt;display-name&gt;Sample Todo&lt;/display-name&gt;
-  &lt;module&gt;
-    &lt;web&gt;
-      &lt;web-uri&gt;app.war&lt;/web-uri&gt;
-      &lt;context-root&gt;/jsfejb3&lt;/context-root&gt;
-    &lt;/web&gt;
-  &lt;/module&gt;
-  &lt;module&gt;
-    &lt;ejb&gt;app.jar&lt;/ejb&gt;
-  &lt;/module&gt;
-&lt;/application&gt;
-</programlisting>
-					</para>
-				</listitem>
-				<listitem>
-					<para>
-						<literal>jboss-app.xml</literal>: Every EAR application should specify a unique string name for the class loader. In our case, we use the application name 'jsfejb3' as the class loader name.
-<programlisting>
-&lt;jboss-app&gt;
-  &lt;loader-repository&gt;
-    jsfejb3:archive=jsfejb3.ear
-  &lt;/loader-repository&gt;
-&lt;/jboss-app&gt;
-</programlisting>
-					</para>
-				</listitem>
-				<listitem>
-					<para>
-						<literal>app.jar</literal>: This contains EJB3 Session Bean and Entity Bean classes and the related configuration files. In addition, the <literal>persistence.xml</literal> file configures the back-end data source (in our case the default HSQL database) for the <literal>EntityManager</literal>. 
-<programlisting>
-&lt;persistence&gt;
-   &lt;persistence-unit name="helloworld"&gt;
-      &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
-      &lt;jta-data-source&gt;java:/DefaultDS&lt;/jta-data-source&gt;
-      &lt;properties&gt;
-         &lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/&gt;
-         &lt;property name="hibernate.hbm2ddl.auto" value="create-drop"/&gt;
-      &lt;/properties&gt;
-   &lt;/persistence-unit&gt;
-&lt;/persistence&gt;
-</programlisting>
-					</para>
-				</listitem>
-				<listitem>
-					<para>
-						<literal>app.war</literal>: This contains the Web UI files packaged according to the Web Application aRchive (WAR) specification. It contains all the web pages and the required configuration files. The <literal>web.xml</literal> file is an important file for all JAVA EE web applications. It is the web deployment descriptor file. The <literal>faces-config.xml</literal> file is the configuration file for JSF. The <literal>navigation.xml</literal> file contains the rules for JSF page navigation.
-					</para>
-<programlisting>
-//faces-config.xml
-&lt;faces-config&gt;
-  &lt;application&gt;
-    &lt;view-handler&gt;
-      com.sun.facelets.FaceletViewHandler
-    &lt;/view-handler&gt;
-  &lt;/application&gt;
-  &lt;managed-bean&gt;
-    &lt;description&gt;Dao&lt;/description&gt;
-    &lt;managed-bean-name&gt;todoBean&lt;/managed-bean-name&gt;
-    &lt;managed-bean-class&gt;TodoBean&lt;/managed-bean-class&gt;
-    &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt;
-  &lt;/managed-bean&gt;
-&lt;/faces-config&gt;
-</programlisting>
-				</listitem>
-			</itemizedlist>
-		</section>
-	</section>
-	<section id="The_Database">
-		<title>The Database</title>
-		<section id="The_Database-Creating_the_Database_Schema">
-			<title>Creating the Database Schema</title>
-			<para>
-				To pre-populate the database, we have supplied SQL Code (<literal>import.sql</literal>) to run with HSQL in the <literal>examples/jsfejb3/resources</literal> directory. When you build the application using ANT, this is packaged in the <filename>app.jar</filename> file within the <filename>jsfejb3.ear</filename> file. When the application is deployed, you should be able to view the pre-populated data.
-			</para>
-		</section>
-		<section id="The_Database-The_HSQL_Database_Manager_Tool">
-			<title>The HSQL Database Manager Tool</title>
-			<para>
-				Just as a quick aside at this point, start up the JMX console application and click on the <literal>service=Hypersonic</literal> link which you’ll find under the section <literal>jboss</literal>. If you can’t find this, make sure the Hypersonic service is enabled in the <literal>hsqldb-ds.xml</literal> file.
-			</para>
-			<para>
-				This will take you to the information for the Hypersonic service MBean. Scroll down to the bottom of the page and click the <literal>invoke</literal> button for the <literal>startDatabaseManager()</literal> operation. This starts up the HSQL Manager, a Java GUI application which you can use to manipulate the database directly.
-			</para>
-			<figure id="The_HSQL_Database_Manager_Tool-The_HSQL_Database_Manger_">
-				<title>The HSQL Database Manger </title>
-				<mediaobject>
-					<imageobject>
-						<imagedata align="center" fileref="images/hsql-manager.png"/>
-					</imageobject>
-				</mediaobject>
-			</figure>
-		</section>
-	</section>
-	<section id="Sample_JSF_EJB3_Application-Deploying_the_Application">
-		<title>Deploying the Application</title>
-		<para>
-			Deploying an application in JBoss is simple and easy. You just have to copy the EAR file to the <literal>deploy</literal> directory in the 'server configuration' directory of your choice. Here, we will deploy it to the 'default' configuration, so we copy the EAR file to the <literal>JBOSS_DIST/jboss-as/server/default/deploy</literal> directory.
-		</para>
-		<para>
-			You should see something close to the following output from the server:
-		</para>
-<screen>
-15:32:23,997 INFO  [EARDeployer] Init J2EE application: file:/jboss/jboss-as-5.0.0&lt;release&gt;/server/default/deploy/jsfejb3.ear
-15:32:24,212 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.
-entity.PersistenceUnitDeployment
-15:32:24,213 INFO  [JmxKernelAbstraction] installing MBean: persistence.units:ear=
-jsfejb3.ear,jar=app.jar,unitName=helloworld with dependencies:
-15:32:24,213 INFO  [JmxKernelAbstraction]       jboss.jca:name=DefaultDS,service=
-DataSourceBinding
-15:32:24,275 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.
-units:ear=jsfejb3.ear,jar=app.jar,unitName=helloworld
-15:32:24,392 INFO  [Ejb3Configuration] found EJB3 Entity bean: Todo
-15:32:24,450 WARN  [Ejb3Configuration] Persistence provider caller does not implements 
-the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
-15:32:24,512 INFO  [Configuration] Reading mappings from resource : META-INF/orm.xml
-15:32:24,512 INFO  [Ejb3Configuration] [PersistenceUnit: helloworld] no META-INF/orm.xml 
-found
-15:32:24,585 INFO  [AnnotationBinder] Binding entity from annotated class: Todo
-15:32:24,586 INFO  [EntityBinder] Bind entity Todo on table Todo
-.
-.
-.
-.
-15:32:26,311 INFO  [SchemaExport] Running hbm2ddl schema export
-15:32:26,312 INFO  [SchemaExport] exporting generated schema to database
-15:32:26,314 INFO  [SchemaExport] Executing import script: /import.sql
-15:32:26,418 INFO  [SchemaExport] schema export complete
-15:32:26,454 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.
-initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.
-naming:org.jnp.interfaces}
-15:32:26,484 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.
-stateless.StatelessContainer
-15:32:26,485 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=jsfejb3.ear,
-jar=app.jar,name=TodoDao,service=EJB3 with dependencies:
-15:32:26,513 INFO  [JmxKernelAbstraction]       persistence.units:ear=jsfejb3.ear,
-jar=app.jar,unitName=helloworld
-15:32:26,557 INFO  [EJBContainer] STARTED EJB: TodoDao ejbName: TodoDao
-15:32:26,596 INFO  [EJB3Deployer] Deployed: file:/jboss/jboss-as-5.0.0&lt;release&gt;
-server/default/tmp/deploy/
-tmp33761jsfejb3.ear-contents/app.jar
-15:32:26,625 INFO  [TomcatDeployer] deploy, ctxPath=/jsfejb3, warUrl=.../tmp/deploy/
-tmp33761jsfejb3.ear-contents/app-exp.war/
-15:32:26,914 INFO  [EARDeployer] Started J2EE application: file:/jboss/jboss-as-5.0.0&lt;release&gt;/server/default/deploy/jsfejb3.ear
-</screen>
-		<para>
-			If there are any errors or exceptions, make a note of the error message. Check that the EAR is complete and inspect the WAR file and the EJB jar files to make sure they contain all the necessary components (classes, descriptors etc.).
-		</para>
-		<para>
-			You can safely redeploy the application if it is already deployed. To undeploy it you just have to remove the archive from the <literal>deploy</literal> directory. There’s no need to restart the server in either case. If everything seems to have gone OK, then point your browser at the application URL.
-		</para>
-		<para>
-			<ulink url="http://localhost:8080/jsfejb3"/>
-		</para>
-		<para>
-			You will be forwarded to the application main page. <xref linkend="Deploying_the_Application-Sample_TODO"/> shows the sample application in action.
-		</para>
-		<figure id="Deploying_the_Application-Sample_TODO">
-			<title>Sample TODO</title>
-			<mediaobject>
-				<imageobject>
-					<imagedata align="center" fileref="images/sample_jsfejb3.png"/>
-				</imageobject>
-			</mediaobject>
-		</figure>
-	</section>
-
-</chapter>

Modified: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Start_Stop_Server.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -46,7 +46,7 @@
 <para>More options for the JBoss Enterprise Application Platform <literal>run</literal> script are discussed in <xref linkend="Starting_and_Stopping_the_Server-Start_the_Server_With_Alternate_Configuration"/> below.</para>
 		<note>
 			<para>
-				Note that there is no <emphasis>Server Started</emphasis> message shown at the console when the server is started using the <literal>production</literal> profile, which is the default profile used when no other is specified. This message may be observed in the <filename>server.log</filename> file located in the <filename class="directory">server/production/log</filename> subdirectory.
+				There is no <emphasis>Server Started</emphasis> message shown at the console when the server is started using the <literal>production</literal> profile. This message may be observed in the <filename>server.log</filename> file located in the <filename class="directory">server/production/log</filename> subdirectory.
 			</para>
 		</note>
 	</section>

Deleted: projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml
===================================================================
--- projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml	2009-10-28 23:00:48 UTC (rev 95714)
+++ projects/docs/enterprise/5.0/Getting_Started_Guide/en-US/Using_Seam.xml	2009-10-29 00:14:48 UTC (rev 95715)
@@ -1,461 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="Using_Seam">
-	<title>Using Seam</title>
-	<para>
-		JBoss Seam is a framework that provides the glue between the new EJB3 and JSF frameworks that are part of the Java EE 5.0 standard. In fact, the name Seam refers to the seamless manner in which it enables developers to use these two frameworks in an integrated manner. Seam automates many of the common tasks, and makes extensive use of annotations to reduce the amount of xml code that needs to be written. The overall effect is to significantly reduce the total amount of coding that needs to be done.
-	</para>
-	
-	<para>
-		If you are new to Seam, you can find more introductory information from the following url and book:
-<itemizedlist>
-	<listitem>
-		<para>
-			<ulink url="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.0/html-single/Seam_Reference_Guide/index.html">The Seam Reference Guide</ulink>.
-			</para>
-		</listitem>
-		<listitem>
-			<para>
-				<emphasis>Beginning JBoss Seam</emphasis> by Joseph Faisal Nusairat, Apress 2007.
-			</para>
-		</listitem>
-	
-	</itemizedlist>
-	
-	</para>
-	
-	<para>
-		We have included two versions of the example application, one coded using EJB3 / JSF without using Seam, and one using Seam, to demonstrate clearly the difference in application development using the Seam framework.
-	</para>
-	
-	
-	
-	<section id="Using_Seam_Data_Model">
-		<title>
-			Data Model
-		</title>
-		
-		<para>
-			Let's start off our examination of the Seam implementation in the same way, by examining how the Data Model is implemented. This is done in the <literal>Todo.java</literal> file.
-		</para>
-		
-		<programlisting>@Entity
- at Name("todo")
-public class Todo implements Serializable {
-
-  private long id;
-  private String title;
-  private String description;
-
-  public Todo () {
-    title ="";
-    description ="";
-  }
-
-  @Id @GeneratedValue
-  public long getId() { return id;}
-  public void setId(long id) { this.id = id; }
-
-  @NotNull
-  public String getTitle() { return title; }
-  public void setTitle(String title) {this.title = title;}
-
-  @NotNull
-  @Length(max=250) 
-  public String getDescription() { return description; }
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-}</programlisting>
-	
-	<para>
-		The <literal>@Entity</literal> annotation defines the class as an EJB3 entity bean, and tells the container to map the <literal>Todo</literal> class to a relational database table. Each property of the class will become a column in the table. Each instance of the class will become a row in this table. Since we have not used the <literal>@Table</literal> annotation, Seam's "configuration by exception" default will name the table after the class. 
-	</para>
-		
-	<para>
-		<literal>@Entity</literal> and <literal>@Table</literal> are both EJB3 annotations, and are not specific to Seam. It is possible to use Seam completely with POJOs (Plain Old Java Objects) without any EJB3-specific annotations. However, EJB3 brings a lot of advantages to the table, including container managed security, message-driven components, transaction and component level persistence context, and <literal>@PersistenceContext</literal> injection, which we will encounter a little further on.
-	</para>
-	
-	<para>
-		The <literal>@Name</literal> annotation is specific to Seam, and defines the string name for Seam to use to register the Entity Bean. This will be the default name for the relational database table. Each component in a Seam application must have a unique name. In the other components in the Seam framework, such as JSF web pages and session beans, you can reference the managed <literal>Todo</literal> bean using this name. If no instance of this class exists when it is referenced from another component, then Seam will instantiate one.   
-	</para>
-	
-	<para>
-		The <literal>@Id</literal> annotation defines a primary key <literal>id</literal> field for the component. <literal>@GeneratedValue</literal> specifies that the server will automatically generate this value for the component when it is saved to the database.
-	</para>
-	
-	<para>
-		Seam provides support for model-based constraints defined using Hibernate Validator, although Hibernate does not have to be the object persister used. The <literal>@NotNull</literal> annotation is a validation constraint that requires this property to have a value before the component can be persisted into the database. Using this annotation allows the validation to be enforced by the JSF code at the view level, without having to specify the exact validation constraint in the JSF code.
-	</para>
-	
-	<para>
-		At this point the only apparent difference between the Seam version and the EJB3/JSF version of the app is the inclusion of the validator annotation <literal>@NotNull</literal>, and the <literal>@Name</literal> annotation. However, while the EJB3/JSF version of this application requires a further <literal>TodoBean</literal> class to be manually coded and managed in order to handle the interaction between the <literal>Todo</literal> class and the web interface, when using Seam the Seam framework takes care of this work for us. We'll see how this is done in practice as we examine the implementation of the user interface.
-	</para>
-	</section>	
-	
-	<section id="Using_Seam_JSF_Web_Pages">
-		<title>
-			JSF Web Pages: index.xhtml and create.xhtml
-		</title>
-		
-		<para>
-			The <emphasis role="bold">index.xhtml</emphasis> file used is the same as in the EJB3/JSF example.
-		</para>
-		
-		<para>
-			<emphasis role="bold">create.xhtml</emphasis> begins to reveal the difference that coding using the Seam framework makes.
-		</para>
-		
-		<programlisting>&lt;h:form id="create"&gt;
-
-&lt;f:facet name="beforeInvalidField"&gt;
-  &lt;h:graphicImage styleClass="errorImg" value="error.png"/&gt;
-&lt;/f:facet&gt;
-&lt;f:facet name="afterInvalidField"&gt;
-  &lt;s:message styleClass="errorMsg" /&gt;
-&lt;/f:facet&gt;
-&lt;f:facet name="aroundInvalidField"&gt;
-  &lt;s:div styleClass="error"/&gt;
-&lt;/f:facet&gt;
-
-&lt;s:validateAll&gt;
-
-&lt;table&gt;
-
-  &lt;tr&gt;
-    &lt;td&gt;Title:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;s:decorate&gt;
-        &lt;h:inputText id="title" value="#{todo.title}" size="15"/&gt;
-      &lt;/s:decorate&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-
-  &lt;tr&gt;
-    &lt;td&gt;Description:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;s:decorate&gt;
-        &lt;h:inputTextarea id="description" value="#{todo.description}"/&gt;
-      &lt;/s:decorate&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-
-&lt;/table&gt;
-
-&lt;/s:validateAll&gt;
-
-&lt;h:commandButton type="submit" id="create" value="Create"
-                 action="#{todoDao.persist}"/&gt;
-&lt;/h:form&gt;
-		</programlisting>
-		
-		<para>
-			The first thing that is different here is the Java Server Facelet code at the beginning, which works with the <literal>@NotNull</literal> validation constraint of our <literal>todo</literal> class to enforce and indicate invalid input to the user.
-		</para>
-		
-		<para>
-			Also notice here that rather than requiring the use of a <literal>TodoBean</literal> class as we did in the EJB3/JSF example we back the form directly with a <literal>Todo</literal> entity bean. When this page is called, JSF asks Seam to resolve the variable <literal>todo</literal> due to JSF EL references such as <literal>#{todo.title}</literal>. Since there is no value already bound to that variable name, Seam will instantiate an entity bean of the <literal>todo</literal> class and return it to JSF, after storing it in the Seam context. The Seam context replaces the need for an intermediary bean.
-		</para>
-		
-		<para>
-			The form input values are validated against the Hibernate Validator constraints specified in the <literal>todo</literal> class. JSF will redisplay the page if the constraints are violated, or it will bind the form input values to the <literal>Todo</literal> entity bean. 
-		</para>
-		
-		<para>
-			Entity beans shouldn't do database access or transaction management, so we can't use the <literal>Todo</literal> entity bean as a JSF action listener. Instead, creation of a new todo item in the database is accomplished by calling the <literal>persist</literal> method of a <literal>TodoDao</literal> session bean. When JSF requests Seam to resolve the variable <literal>todoDao</literal> through the JSF EL expression <literal>#{todoDao.persist}</literal>, Seam will either instantiate an object if one does not already exist, or else pass the existing stateful <literal>todoDao</literal> object from the Seam context. Seam will intercept the <literal>persist</literal> method call and inject the <literal>todo</literal> entity from the session context. 
-		</para>
-		
-		<para>
-			Let's have a look at the <literal>TodoDao</literal> class (defined in <literal>TodoDao.java</literal>) to see how this injection capability is implemented.
-		</para>
-	</section>
-	
-	<section id="Using_Seam_Session_Bean">
-		<title>
-			Data Access using a Session Bean
-		</title>
-		
-		<para>
-			Let's go through a listing of the code for the <literal>TodoDao</literal> class. 
-		</para>
-				
-		<programlisting>@Stateful
- at Name("todoDao")
-public class TodoDao implements TodoDaoInt {
-
-  @In (required=false) @Out (required=false)
-  private Todo todo;
-
-  @PersistenceContext (type=EXTENDED)
-  private EntityManager em;
-
-  // Injected from pages.xml
-  Long id;
- 
-  public String persist () {
-    em.persist (todo);
-    return "persisted";
-  }
-
-  @DataModel
-  private List &lt;Todo&gt; todos;
-
-  @Factory("todos")
-  public void findTodos () {
-    todos = em.createQuery("select t from Todo t")
-                                  .getResultList();
-  }
-
-  public void setId (Long id) {
-    this.id = id;
-    
-    if (id != null) {
-      todo = (Todo) em.find(Todo.class, id);
-    } else {
-      todo = new Todo ();
-    }
-  }
-  
-  public Long getId () {
-    return id;
-  }
-
-  public String delete () {
-    em.remove( todo );
-    return "removed";
-  }
-
-  public String update () {
-    return "updated";
-  }
-
-  @Remove @Destroy
-  public void destroy() {}
-
-}</programlisting>
-
-		<para>
-			First of all notice that this is a stateful session bean. Seam can use both stateful and stateless session beans, the two most common types of EJB3 beans.
-		</para>
-		
-		<para>
-			The <literal>@In</literal> and <literal>@Out</literal> annotations define an attribute that is injected by Seam. The attribute is injected to this object or from this object to another via a Seam context variable named <literal>todo</literal>, a reference to the Seam registered name of our <literal>Todo</literal> class defined in <literal>Todo.java</literal>.
-		</para>
-		
-		<para>
-			The <literal>@PersistenceContext</literal> annotation injects the EJB3 Entity manager, allowing this object to persist objects to the database. Because this is a stateful session bean and the <literal>PersistenceContext</literal> type is set to <literal>EXTENDED</literal>, the same Entity Manager instance is used until the Remove method of the session bean is called. The database to be used (a <literal>persistence-unit</literal>) is defined in the file <filename>resources/META-INF/persistence.xml</filename>
-		</para>
-		
-		<para>
-			Note that this session bean has simultaneous access to context associated with web request (the form values of the <literal>todo</literal> object), and state held in transactional resources (the <literal>EntityManager</literal>). This is a break from traditional J2EE architectures, but Seam does not force you to work this way. You can use more traditional forms of application layering if you wish.
-		</para>
-		
-		<para>
-			The <literal>@DataModel</literal> annotation initializes the <literal>todos</literal> property, which will be outjected or "exposed" to the view. The <literal>@Factory</literal> annotated method performs the work of generating the <literal>todos</literal> list, and is called by Seam if it attempts to access the exposed <literal>DataModel</literal> property and finds it to be null. Notice the absence of property access methods for the <literal>todos</literal> property. Seam takes care of this for you automatically. 
-		</para>
-		
-		<para>
-			Let's take a look at the JSF code that we use for displaying and editing the list of todos, to get an idea of how to use these interfaces in practice.
-		</para>
-		
-		</section>
-		
-		<section id="Using_Seam_Display_and_Edit">
-			<title>
-				JSF Web Pages - todos.xhtml and edit.xhtml
-			</title>
-			
-			<para>	
-				Using the <literal>DataModel</literal> exposed property of the Session Bean it becomes trivial to produce a list of todos:
-			</para>
-			
-			<programlisting>&lt;h:form&gt;
-
-&lt;h:dataTable value="#{todos}" var="todo"&gt;
-  &lt;h:column&gt;
-    &lt;f:facet name="header"&gt;Title&lt;/f:facet&gt;
-    #{todo.title}
-  &lt;/h:column&gt;
-  &lt;h:column&gt;
-    &lt;f:facet name="header"&gt;Description&lt;/f:facet&gt;
-    #{todo.description}
-  &lt;/h:column&gt;
-  &lt;h:column&gt;
-    &lt;a href="edit.seam?tid=#{todo.id}"&gt;Edit&lt;/a&gt;
-  &lt;/h:column&gt;
-&lt;/h:dataTable&gt;
-
-&lt;center&gt;
-  &lt;h:commandButton action="create"
-            value="Create New Todo" type="submit"/&gt;
-&lt;/center&gt;
-
-&lt;/h:form&gt;
-</programlisting>
-		
-		<para> 
-			When the JSF variable resolver encounters <literal>{#todos}</literal> and requests <literal>todos</literal>, Seam finds that there is no "todos" component in the current scope, so it calls the @Factory("todos") method to make one. The todos object is then outjected once the factory method is done since it is annotated with the @DataModel annotation. <!--Seam responses by finding the <literal>todos</literal> <literal>DataModel</literal> registered with it, and outjecting that from the bean.-->
-		</para>
-		
-		<para>
-			Constructing the view for the edit page is similarly straight forward:
-		</para>
-		
-		<programlisting>&lt;h:form id="edit"&gt;
-  
-&lt;f:facet name="beforeInvalidField"&gt;
-  &lt;h:graphicImage styleClass="errorImg" value="error.png"/&gt;
-&lt;/f:facet&gt;
-&lt;f:facet name="afterInvalidField"&gt;
-  &lt;s:message styleClass="errorMsg" /&gt;
-&lt;/f:facet&gt;
-&lt;f:facet name="aroundInvalidField"&gt;
-  &lt;s:div styleClass="error"/&gt;
-&lt;/f:facet&gt;
-
-&lt;s:validateAll&gt;
-
-&lt;table&gt;
-
-  &lt;tr&gt;
-    &lt;td&gt;Title:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;s:decorate&gt;
-        &lt;h:inputText id="title" value="#{todo.title}" size="15"/&gt;
-      &lt;/s:decorate&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-
-  &lt;tr&gt;
-    &lt;td&gt;Description:&lt;/td&gt;
-    &lt;td&gt;
-      &lt;s:decorate&gt;
-        &lt;h:inputTextarea id="description" value="#{todo.description}"/&gt;
-      &lt;/s:decorate&gt;
-    &lt;/td&gt;
-  &lt;/tr&gt;
-
-&lt;/table&gt;
-
-&lt;/s:validateAll&gt;
-
-&lt;h:commandButton type="submit" id="update" value="Update"
-                 action="#{todoDao.update}"/&gt;
-&nbsp;
-&lt;h:commandButton type="submit" id="delete" value="Delete"
-                 action="#{todoDao.delete}"/&gt;
-&lt;/h:form&gt;
-		</programlisting>
-		
-		<para>
-			Here we see the same factors in play. JSF validation code taking advantage of the validation constraints defined in our Entity Bean, and the use of the <literal>todoDao</literal> Session Bean's <literal>update</literal> and <literal>delete</literal> methods to update the database.
-		</para>
-		
-		<para>
-			The call from <filename>todos.xhtml</filename>: <literal>edit.seam?tid=#{todo.id}</literal> causes Seam to create a <literal>todoDao</literal> and set it's <literal>id</literal> property to <literal>tid</literal>. Setting its <literal>id</literal> property causes the <literal>todoDao</literal> to retrieve the appropriate record from the database.
-		</para>
-		
-		<para>
-			The functionality that allows the edit page to be called with a parameter in this way is implemented through <literal>pages.xml</literal>. Let's have a look at the  <literal>pages.xml</literal> file and how it is used by Seam applications.
-		</para>
-	</section>
-	<section id="Using_Seam_Building_Apps">
-		<title>Building The Application</title>
-		<para>
-			At the command line, go to <literal>JBOSS_DIST/doc/examples/gettingstarted/seamejb3</literal> directory. There you will see a <literal>build.xml</literal> file. This is our Ant build script for compiling and packaging the archives. To build the application, just type the command <literal>ant</literal> and your output should look like this:
-<programlisting>
-[&lt;user&gt;@&lt;computer&gt; jsfejb3]$ ant
-
-Buildfile: build.xml
-
-compile:
-[mkdir] Created dir: 
-/home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/build/classes
-[javac] Compiling 3 source files to 
-/home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/build/classes
-[javac] Note: /home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/src/TodoDao.java 
-uses unchecked or unsafe operations.
-[javac] Note: Recompile with -Xlint:unchecked for details.
-
-war:
-[mkdir] Created dir: /home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/build/jars
-[war] Building war: /home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/build/jars/app. war
-
-ejb3jar:
-[jar] Building jar: /home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/build/jars/app. jar
-
-ear:
-[ear] Building ear: 
-/home/&lt;user&gt;/jboss-eap-5.0/doc/examples/gettingstarted/seamejb3/build/jars/seam ejb3.ear
-
-main:
-
-BUILD SUCCESSFUL
-Total time: 7 seconds
-</programlisting>
-		</para>
-		<para>
-			If you get the <literal>BUILD SUCCESSFUL</literal> message, you will find a newly created <literal>build</literal> directory with two sub-directories in it: <itemizedlist>
-				<listitem>
-					<para>
-						<emphasis role="bold">classes</emphasis>: containing the compiled class files.
-					</para>
-				</listitem>
-				<listitem>
-					<para>
-						<emphasis role="bold">jars</emphasis>: containing three archives - <literal>app.jar</literal>, <literal>app.war</literal> and <literal>seamejb3.ear</literal>. <itemizedlist>
-							<listitem>
-								<para>
-									app.jar
-								</para>
-							</listitem>
-							<listitem>
-								<para>
-									app.war
-								</para>
-							</listitem>
-							<listitem>
-								<para>
-									seamejb3.ear
-								</para>
-							</listitem>
-						</itemizedlist>
-						For more details on these files and their contents refer to <xref linkend="Sample_JSF_EJB3_Application-Configuration_and_Packaging"/>.
-					</para>
-				</listitem>
-			</itemizedlist>
-		</para>
-	</section>
-	<section id="Using_Seam_XML_Files">
-		<title>
-			Xml Files
-		</title>
-		
-		<para>
-			Seam drastically reduces the amount of xml coding that needs to be done. One file that is of interest is the  <literal>pages.xml</literal>, packaged in the <literal>app.war</literal> file's <literal>WEB-INF</literal> directory. This file is available in the <literal>resources/WEB-INF</literal> directory in the source code bundle. The  <literal>pages.xml</literal> file is used to define page descriptions including Seam page parameters (HTTP <literal>GET</literal> parameters), page actions, page navigation rules, error pages etc. <!--This file defines a number of attributes that affect global behaviour of the application.--> Among other things it can be used in a Seam application to define exception handlers and redirections.
-		</para>
-		<para>
-			In the case of our sample application we are using it to define a Seam page parameter. The <literal>pages.xml</literal> in this example contains the following code:
-		</para>
-		
-		<programlisting>&lt;page view-id="/edit.xhtml"&gt;
-    &lt;param name="tid" value="#{todoDao.id}" 
-           converterId="javax.faces.Long"/&gt;
-&lt;/page&gt;</programlisting>
-		<para>
-			This defines a parameter named <literal>tid</literal> for the <literal>edit.xhtml</literal> page. When the <literal>edit.xhtml</literal> page is loaded, the HTTP <literal>GET</literal> request parameter <literal>tid</literal> is converted to a <literal>Long</literal> value and assigned to the <literal>id</literal> property of the <literal>todoDao</literal> object. You can have as many page parameters as required to bind HTTP <literal>GET</literal> request parameters to the back-end components in your application.
-		</para>
-	</section>
-	
-	<section id="Further_Information">
-		<title>
-			Further Information
-		</title>
-		
-		<para>
-			This completes our walkthrough of the sample Seam application. For further, detailed information on developing applications using the Seam framework, please refer to the <ulink url="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5.0.0/html-single/Seam_Reference_Guide/index.html">The Seam Reference Guide</ulink>.
-		</para>
-	</section>
-</chapter>




More information about the jboss-cvs-commits mailing list