[jboss-cvs] JBossAS SVN: r105618 - projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 3 02:42:25 EDT 2010


Author: misty at redhat.com
Date: 2010-06-03 02:42:24 -0400 (Thu, 03 Jun 2010)
New Revision: 105618

Modified:
   projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Tutorial.xml
Log:
JBPAPP-4387

Modified: projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Tutorial.xml	2010-06-03 06:34:26 UTC (rev 105617)
+++ projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Tutorial.xml	2010-06-03 06:42:24 UTC (rev 105618)
@@ -116,7 +116,7 @@
                <!--   <example><title>User.java</title> -->
                <formalpara><title>User.java Example</title>
                  <para>               					 
-<programlisting role="JAVA"><![CDATA[@Entity
+<programlisting language="Java" role="JAVA">@Entity
 @Name("user")
 @Scope(SESSION)
 @Table(name="users")
@@ -162,7 +162,7 @@
     this.username = username;
   }
 
-}]]>
+}
 </programlisting>
                  </para>
                </formalpara>   
@@ -247,7 +247,7 @@
                   <para> 
 					
 					 
-<programlisting><![CDATA[@Stateless
+<programlisting language="Java" role="JAVA">@Stateless
 @Name("register")
 public class RegisterAction implements Register {
   @In
@@ -274,7 +274,7 @@
     }
   }
 
-}]]>
+}
 </programlisting>
                   </para>
                 </formalpara>
@@ -359,10 +359,11 @@
 			<!--  	 <example>
 					<title>Register.java</title> -->
 					 
-<programlisting role="JAVA"><![CDATA[@Local
+<programlisting language="Java" role="JAVA">@Local
 public interface Register {
   public String register();
-}]]></programlisting>
+}
+</programlisting>
 			<!--  	</example> -->
 			      </para>
 			    </formalpara>
@@ -382,7 +383,7 @@
 			<!--  	<example>
 					<title>register.xhtml</title> -->
 					 
-<programlisting role="XHTML"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?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"
@@ -425,7 +426,7 @@
 			<!--  	 <example> 
 					<title>registered.xhtml</title>-->
 					 
-<programlisting role="XHTML"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?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"
@@ -469,7 +470,7 @@
 			      <formalpara><title>components.xml Example</title>
                     <para>
 					 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <components xmlns="http://jboss.com/products/seam/components"
             xmlns:core="http://jboss.com/products/seam/core"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -501,7 +502,7 @@
 			    <formalpara><title>web.xml Example</title>
                   <para>
 					 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation=
@@ -553,7 +554,7 @@
 				<formalpara><title>faces-config.xml Example</title>
                   <para>
 					 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation=
@@ -587,7 +588,7 @@
 					The <filename>ejb-jar.xml</filename> file integrates Seam with EJB3 by attaching the <literal>SeamInterceptor</literal> to all session beans in the archive.
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation=
@@ -622,7 +623,7 @@
 					The <literal>persistence.xml</literal> file directs the EJB persistence provider to the appropriate datasource, and contains some vendor-specific settings. In this case, it enables automatic schema export at startup time.
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <persistence xmlns="http://java.sun.com/xml/ns/persistence" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation=
@@ -653,7 +654,7 @@
 				<formalpara><title>registration application Example</title>
                     <para>
 					 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <application xmlns="http://java.sun.com/xml/ns/javaee" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation=
@@ -746,7 +747,7 @@
 				<formalpara><title>Message.java Example</title>
                   <para>
 					 
-<programlisting role="JAVA"><![CDATA[@Entity
+<programlisting language="Java" role="JAVA">@Entity
 @Name("message")
 @Scope(EVENT)
 public class Message implements Serializable {
@@ -796,7 +797,7 @@
   public void setDatetime(Date datetime) {
     this.datetime = datetime;
   }
-}]]>
+}
 </programlisting>
                   </para>
                 </formalpara>  
@@ -819,12 +820,12 @@
 			    <formalpara><title>MessageManagerBean.java Example</title>
                   <para>
 					 
-<programlisting><![CDATA[@Stateful
+<programlisting language="Java" role="JAVA">@Stateful
 @Scope(SESSION)
 @Name("messageManager")
 public class MessageManagerBean implements Serializable, MessageManager {
   @DataModel
-  private List<Message> messageList;
+  private List&lt;Message&gt; messageList;
   
   @DataModelSelection
   @Out(required=false)
@@ -853,7 +854,7 @@
   @Remove
   public void destroy() {}
 
-}]]>
+}
 </programlisting>
                   </para>
                 </formalpara>  
@@ -922,13 +923,13 @@
 			    <formalpara><title>MessageManager.java Example</title>
                   <para>
 					 
-<programlisting role="JAVA"><![CDATA[@Local
+<programlisting language="Java" role="JAVA">@Local
 public interface MessageManager {
   public void findMessages();
   public void select();
   public void delete();
   public void destroy();
-}]]>
+}
 </programlisting>
                   </para>
                 </formalpara>   
@@ -947,7 +948,7 @@
 					<title>messages.jsp</title> -->
 				<formalpara><title>messages.jsp Example</title>
                   <para>
-<programlisting role="XHTML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<programlisting language="XML" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <html>
   <head>
@@ -1041,7 +1042,7 @@
 			<formalpara><title>todo.jpdl.xml Example</title>
               <para>
 				 <!-- <programlistingco> <areaspec> <area id="todo-startstate" coords="3"/> <area id="todo-tasknode" coords="7"/> <area id="todo-task" coords="8"/> <area id="todo-assignment" coords="9"/> <area id="todo-endstate" coords="14"/> </areaspec> --> 
-<programlisting><![CDATA[<process-definition name="todo">
+<programlisting language="XML" role="XML"><![CDATA[<process-definition name="todo">
   
   <start-state name="start">
     <transition to="todo"/>
@@ -1115,7 +1116,7 @@
 				<formalpara><title>Login.java Example</title>
                   <para>
 				 
-<programlisting role="JAVA"><![CDATA[@Name("login")
+<programlisting language="Java" role="JAVA">@Name("login")
 public class Login {
   @In
   private Actor actor;
@@ -1134,7 +1135,7 @@
     actor.setId(user);
     return "/todo.jsp";
   }
-}]]>
+}
 </programlisting>
                   </para>
                 </formalpara>
@@ -1151,7 +1152,7 @@
 				<formalpara><title>login.jsp Example</title>
                   <para>
 				 
-<programlisting role="XHTML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<programlisting language="XML" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
 <html>
   <head>
@@ -1182,7 +1183,7 @@
 				 <!-- <programlistingco> <areaspec> <area id="todo-description" coords="6"/> <area id="todo-createprocess-annotation" coords="15"/> <area id="todo-task-annotations" coords="18"/> </areaspec> --> 
 			<formalpara><title>TodoList.java Example</title>
                   <para>	 
-<programlisting><![CDATA[@Name("todoList")
+<programlisting langauge="Java" role="JAVA">@Name("todoList")
 public class TodoList {
   private String description;
   
@@ -1200,7 +1201,7 @@
   @StartTask @EndTask
   public void done() {}
 
-}]]>
+}
 </programlisting>
                   </para>
                 </formalpara>
@@ -1241,7 +1242,7 @@
 				<formalpara><title>todo.jsp Example</title>
                   <para>
 				 
-<programlisting role="XHTML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<programlisting language="XML" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s" %>
 <html>
@@ -1323,7 +1324,7 @@
 				<title>todo.jsp (taskInstanceList)</title> -->
 			<formalpara><title>todo.jsp - taskInstanceList</title>
               <para>	 
-<programlisting role="XHTML"><![CDATA[<h:form id="list">
+<programlisting language="XML" role="XML"><![CDATA[<h:form id="list">
   <div>
     <h:outputText value="There are no todo items." 
                   rendered="#{empty taskInstanceList}"/>
@@ -1341,7 +1342,7 @@
 				Each element of the list is an instance of the jBPM class <literal>TaskInstance</literal>. The following code displays certain properties for every task in the list. Input controls are used for description, priority, and due date to allow users to update these values.
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<h:column>
+<programlisting language="XML" role="XML"><![CDATA[<h:column>
   <f:facet name="header">
     <h:outputText value="Description"/>
   </f:facet>
@@ -1379,7 +1380,7 @@
 				This button ends the task by calling the action method annotated <literal>@StartTask @EndTask</literal>. It passes the task ID to Seam as a request parameter:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<h:column> 
+<programlisting language="XML" role="XML"><![CDATA[<h:column> 
   <s:button value="Done" action="#{todoList.done}" 
             taskInstance="#{task}"/>
 </h:column>]]>
@@ -1388,13 +1389,13 @@
 				Note that this uses a Seam <literal><![CDATA[<s:button>]]></literal> JSF control from the <literal>seam-ui.jar</literal> package. This button updates the properties of the tasks. When the form is submitted, Seam and jBPM will make any changes to the tasks persistent. There is no need for any action listener method:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<h:commandButton value="Update Items" action="update"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<h:commandButton value="Update Items" action="update"/>]]>
 </programlisting>
 			 <para>
 				A second form on the page creates new items with the action method annotated <literal>@CreateProcess</literal>.
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<h:form id="new    <div> 
+<programlisting language="XML" role="XML"><![CDATA[<h:form id="new    <div> 
     <h:inputText value="#{todoList.description}"/> 
     <h:commandButton value="Create New Item" 
                      action="#{todoList.createTodo}"/>
@@ -1451,7 +1452,7 @@
 				 <!-- <programlistingco> <areaspec> <area id="numberguess-page" coords="8"/> <area id="numberguess-transition" coords="10"/> <area id="numberguess-action" coords="11"/> <area id="numberguess-decision" coords="16"/> </areaspec> -->
 			<formalpara><title>pageflow.jpdl.xml Example</title>
               <para>	  
-<programlisting><![CDATA[<pageflow-definition 
+<programlisting language="XML" role="XML"><![CDATA[<pageflow-definition 
         xmlns="http://jboss.com/products/seam/pageflow"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation=
@@ -1555,7 +1556,7 @@
 				<formalpara><title>numberGuess.jspx Example</title>
                   <para>
 				 
-<programlisting role="XHTML"><![CDATA[<?xml version="1.0"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0"?>
 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" 
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:f="http://java.sun.com/jsf/core"
@@ -1657,7 +1658,7 @@
 			<formalpara><title>win.jspx Example</title>
               <para>
 				 
-<programlisting role="JSP"><![CDATA[<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" 
+<programlisting language="XML" role="XML"><![CDATA[<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" 
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns="http://www.w3.org/1999/xhtml"
@@ -1702,7 +1703,7 @@
 				 <!-- <programlistingco> <areaspec> <area id="numberguess-create" coords="13"/> </areaspec> -->
 				 <formalpara><title>NumberGuess.java Example</title>
                   <para> 
-<programlisting><![CDATA[@Name("numberGuess")
+<programlisting language="Java" role="JAVA">@Name("numberGuess")
 @Scope(ScopeType.CONVERSATION)
 public class NumberGuess implements Serializable {
    
@@ -1734,7 +1735,7 @@
     if (currentGuess>randomNumber) {
       biggest = currentGuess - 1;
     }
-    if (currentGuess<randomNumber) {
+    if (currentGuess&lt;randomNumber) {
       smallest = currentGuess + 1;
     }
     guessCount ++;
@@ -1784,13 +1785,13 @@
     return cheated;
   }
   
-  public List<Integer> getPossibilities() {
-    List<Integer> result = new ArrayList<Integer>();
-    for(int i=smallest; i<=biggest; i++) result.add(i);
+  public List&lt;Integer&gt; getPossibilities() {
+    List&lt;Integer&gt; result = new ArrayList&lt;Integer&gt;();
+    for(int i=smallest; i&lt;=biggest; i++) result.add(i);
     return result;
   }
   
-}]]>
+}
 </programlisting>
                    </para>
                  </formalpara>
@@ -1816,7 +1817,7 @@
 				<formalpara><title>pages.xml Example</title>
                   <para>
 				 
-<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <pages xmlns="http://jboss.com/products/seam/pages"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
@@ -2035,7 +2036,7 @@
                    <para>
 <!--  <programlisting language="java"><xi:include href="extras/booking.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting> 
   </example> -->	
-<programlisting><![CDATA[@Stateful
+<programlisting language="Java" role="JAVA"><![CDATA[@Stateful
 @Name("hotelSearch")
 @Scope(ScopeType.SESSION)
 @Restrict("#{identity.loggedIn}")
@@ -2139,7 +2140,7 @@
 				 <!--  Can't use code hightlighting with callouts  --> <!-- <programlistingco> <areaspec> <area id="booking-support-element" coords="14"/> <area id="booking-status-element" coords="20"/> <area id="booking-outputpanel-element" coords="37"/> <area id="booking-link-element" coords="61"/> </areaspec> -->
 				 <formalpara><title>main.xhtml Example</title>
                    <para> 
-<programlisting><![CDATA[<div class="section">
+<programlisting language="XML" role="XML"><![CDATA[<div class="section">
   
   <span class="errors">
     <h:messages globalOnly="true"/>
@@ -2253,7 +2254,7 @@
 				 <!--  Can't use code hightlighting with callouts  --> <!-- <programlistingco> <areaspec> <area id="booking-extendedpersistencecontext-annotation" coords="7"/> <area id="booking-out-annotation" coords="17"/> <area id="booking-begin-annotation" coords="31"/> <area id="booking-end-annotation" coords="72"/> <area id="booking-dest-annotation" coords="85"/> </areaspec> -->
 				 <formalpara><title>HotelBookingAction.java Example</title>
                    <para> 
-<programlisting><![CDATA[@Stateful
+<programlisting language="Java" role="JAVA">@Stateful
 @Name("hotelBooking")
 @Restrict("#{identity.loggedIn}")
 public class HotelBookingAction implements HotelBooking {
@@ -2333,7 +2334,7 @@
   public void cancel() {}
   
   @Remove
-  public void destroy() {}]]>
+  public void destroy() {}
 </programlisting>
                    </para>
                  </formalpara>
@@ -2384,7 +2385,7 @@
 				The WAR also includes <filename>seam-debug.jar</filename>. To make the Seam debug page available, deploy this jar in <literal>WEB-INF/lib</literal> alongside Facelets, and set the debug property of the <literal>init</literal> component as shown here:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<core:init jndi-pattern="@jndiPattern@" debug="true"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<core:init jndi-pattern="@jndiPattern@" debug="true"/>]]>
 </programlisting>
 			 <para>
 				The debug page lets you browse and inspect the Seam components in any of the Seam contexts associated with your current login session. Just point your browser at <ulink url="http://localhost:8080/seam-booking/debug.seam"> <literal>http://localhost:8080/seam-booking/debug.seam</literal> </ulink>.
@@ -2440,7 +2441,7 @@
 				 <!--  Can't use code hightlighting with callouts  --> <!-- <programlistingco> <areaspec> <area id="nested-booking-load-rooms" coords="25"/> <area id="nested-booking-nested-conversation" coords="38"/> <area id="nested-booking-select-preference" coords="43"/> <area id="nested-booking-end-annotation" coords="58"/> </areaspec> -->
 			<formalpara><title>RoomPreferenceAction.java Example</title>
               <para>	  
-<programlisting><![CDATA[@Stateful
+<programlisting language="Java" role="JAVA">@Stateful
 @Name("roomPreference")
 @Restrict("#{identity.loggedIn}")
 public class RoomPreferenceAction implements RoomPreference {
@@ -2453,7 +2454,7 @@
   @In private Booking booking;
 
   @DataModel(value="availableRooms")
-  private List<Room> availableRooms;
+  private List&lt;Room&gt; availableRooms;
 
   @DataModelSelection(value="availableRooms")
   private Room roomSelection;
@@ -2501,7 +2502,7 @@
 
   @Destroy @Remove                                                              
   public void destroy() {}    
-}]]>
+}
 </programlisting>
 
                    </para>
@@ -2542,7 +2543,7 @@
 				 <!--  Can't use code hightlighting with callouts  --> <!-- <programlistingco> <areaspec> <area id="nested-booking-available-rooms" coords="19"/> <area id="nested-booking-selection-action" coords="36"/> <area id="nested-booking-cancel-action" coords="45"/> </areaspec> -->
 			<formalpara><title>rooms.xhtml Example</title>
               <para> 
-<programlisting><![CDATA[<div class="section">
+<programlisting language="XML" role="XML"><![CDATA[<div class="section">
   <h1>Room Preference</h1>
 </div>
 
@@ -2630,7 +2631,7 @@
 				 <!--  Can't use code hightlighting with callouts  --> <!-- <programlistingco> <areaspec> <area id="nested-booking-end-root" coords="77"/> <area id="nested-booking-confirm" coords="82"/> <area id="nested-booking-cancel" coords="89" /> </areaspec> -->
 		    <formalpara><title>HotelBookingAction.java Example</title>
               <para> 
-<programlisting><![CDATA[@Stateful
+<programlisting language="XML" role="XML"><![CDATA[@Stateful
 @Name("hotelBooking")
 @Restrict("#{identity.loggedIn}")
 public class HotelBookingAction implements HotelBooking {
@@ -2820,7 +2821,7 @@
 			<!--  <example>
 				<title></title> -->
 				 
-<programlisting role="XHTML"><![CDATA[<h:dataTable value="#{blog.recentBlogEntries}" var="blogEntry" rows="3">
+<programlisting language="XML" role="XML"><![CDATA[<h:dataTable value="#{blog.recentBlogEntries}" var="blogEntry" rows="3">
   <h:column>
     <div class="blogEntry">
       <h3>#{blogEntry.title}</h3>
@@ -2856,7 +2857,7 @@
 		<!--  <example>
 				<title></title> -->
 				 <!--  Can't use code hightlighting with callouts  --> <!-- <programlistingco> <areaspec> <area id="blog-seampc" coords="7"/> <area id="blog-unwrap" coords="9"/> </areaspec> --> 
-<programlisting><![CDATA[@Name("blog")
+<programlisting language="XML" role="XML"><![CDATA[@Name("blog")
 @Scope(ScopeType.STATELESS)
 @AutoCreate
 public class BlogService {
@@ -2900,7 +2901,7 @@
 			<!-- <example>
 				<title></title> -->
 				 
-<programlisting role="XHTML"><![CDATA[<div id="search"> 
+<programlisting language="XML" role="XML"><![CDATA[<div id="search"> 
   <h:form> 
     <h:inputText value="#{searchAction.searchPattern}"/> 
     <h:commandButton value="Search" action="/search.xhtml"/> 
@@ -2911,7 +2912,7 @@
 					To implement a bookmarkable search results page, after the search form submission is processed, we must perform a browser redirect. Because the JSF view ID is used as the action outcome, Seam automatically redirects to the view ID when the form is submitted. We could also have defined a navigation rule as follows:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<navigation-rule> 
+<programlisting language="XML" role="XML"><![CDATA[<navigation-rule> 
   <navigation-case> 
     <from-outcome>searchResults</from-outcome> 
     <to-view-id>/search.xhtml</to-view-id> 
@@ -2924,7 +2925,7 @@
 				In that case, the form would have looked like this:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<div id="search"> 
+<programlisting language="XML" role="XML"><![CDATA[<div id="search"> 
   <h:form> 
     <h:inputText value="#{searchAction.searchPattern}"/> 
     <h:commandButton value="Search" action="searchResults"/> 
@@ -2937,7 +2938,7 @@
 			<!-- <example>
 				<title></title> -->
 				 
-<programlisting role="XML"><![CDATA[<pages>
+<programlisting language="XML" role="XML"><![CDATA[<pages>
   <page view-id="/search.xhtml">
     <rewrite pattern="/search/{searchPattern}"/> 
     <rewrite pattern="/search"/>
@@ -2959,13 +2960,13 @@
 				As with page parameters, rewriting URLs is bidirectional. This means that Seam forwards requests for the simplified URL to the correct view, and it automatically generates the simplified view — users need not construct URLs. The entire process is handled transparently. The only requirement for rewriting URLs is to enable the rewrite filter in <filename>components.xml</filename>:
 			</para>
 			 
-<programlisting><![CDATA[<web:rewrite-filter view-mapping="/seam/*" />]]>
+<programlisting language="XML" role="XML"><![CDATA[<web:rewrite-filter view-mapping="/seam/*" />]]>
 </programlisting>
 			 <para>
 				The redirect takes us to the <literal>search.xhtml</literal> page:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<h:dataTable value="#{searchResults}" var="blogEntry">
+<programlisting language="XML" role="XML"><![CDATA[<h:dataTable value="#{searchResults}" var="blogEntry">
   <h:column>
     <div>
       <s:link view="/entry.xhtml" propagation="none" 
@@ -2985,7 +2986,7 @@
 				Again, this uses "pull"-style MVC to retrieve the search results with Hibernate Search.
 			</para>
 			 
-<programlisting role="JAVA"><![CDATA[@Name("searchService")
+<programlisting language="Java" role="JAVA">@Name("searchService")
 public class SearchService {
    
   @In
@@ -2994,7 +2995,7 @@
   private String searchPattern;
    
   @Factory("searchResults")
-  public List<BlogEntry> getSearchResults() {
+  public List&lt;BlogEntry&gt; getSearchResults() {
     if (searchPattern==null || "".equals(searchPattern) ) {
       searchPattern = null;
       return entityManager.createQuery(
@@ -3002,7 +3003,7 @@
     }
     else
     {
-      Map<String,Float> boostPerField = new HashMap<String,Float>();
+      Map&lt;String,Float&gt; boostPerField = new HashMap&lt;String,Float&gt;();
       boostPerField.put( "title", 4f );
       boostPerField.put( "body", 1f );
       String[] productFields = {"title", "body"};
@@ -3036,7 +3037,7 @@
       this.searchPattern = searchPattern;
    }
 
-}]]>
+}
 </programlisting>
 		</section>
 		
@@ -3054,7 +3055,7 @@
 				The <literal>entryAction</literal> component works much like an action class in a traditional push-MVC action-oriented framework like Struts.
 			</para>
 			 
-<programlisting role="JAVA"><![CDATA[@Name("entryAction")
+<programlisting language="Java" role="JAVA">@Name("entryAction")
 @Scope(STATELESS)
 public class EntryAction
 {
@@ -3067,13 +3068,13 @@
     if (blogEntry==null) throw new EntryNotFoundException(id);
   }
    
-}]]>
+}
 </programlisting>
 			 <para>
 				Page actions are also declared in <literal>pages.xml</literal>:
 			</para>
 			 
-<programlisting role="XML"><![CDATA[<pages>
+<programlisting language="XML" role="XML"><![CDATA[<pages>
    ...
 
   <page view-id="/entry.xhtml"> 
@@ -3115,7 +3116,7 @@
 				When the <filename>entry.xhtml</filename> page is requested, Seam first binds the <literal>blogEntryId</literal> page parameter to the model. Remember that, because of URL rewriting, the blogEntryId parameter name won&#39;t appear in the URL. Seam then runs the page action, which retrieves the required data — the <literal>blogEntry</literal> — and places it in the Seam event context. Finally, it renders the following:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<div class="blogEntry">
+<programlisting language="XML" role="XML"><![CDATA[<div class="blogEntry">
   <h3>#{blogEntry.title}</h3>
   <div>
     <s:formattedText value="#{blogEntry.body}"/>
@@ -3132,19 +3133,19 @@
 				If the blog entry is not found in the database, the <literal>EntryNotFoundException</literal> exception is thrown. We want this exception to result in a 404 error, not a 505, so we annotate the exception class:
 			</para>
 			 
-<programlisting role="JAVA"><![CDATA[@ApplicationException(rollback=true)
+<programlisting language="Java" role="JAVA">@ApplicationException(rollback=true)
 @HttpError(errorCode=HttpServletResponse.SC_NOT_FOUND)
 public class EntryNotFoundException extends Exception {
   EntryNotFoundException(String id) {
     super("entry not found: " + id);
   }
-}]]>
+}
 </programlisting>
 			 <para>
 				An alternative implementation of the example does not use the parameter in the method binding:
 			</para>
 			 
-<programlisting role="JAVA"><![CDATA[@Name("entryAction")
+<programlisting language="Java" role="JAVA">@Name("entryAction")
 @Scope(STATELESS)
 public class EntryAction {
   @In(create=true) 
@@ -3157,10 +3158,10 @@
     blogEntry = blog.getBlogEntry( blogEntry.getId() );
     if (blogEntry==null) throw new EntryNotFoundException(id);
   }
-}]]>
+}
 </programlisting>
 			 
-<programlisting role="XML"><![CDATA[<pages> 
+<programlisting language="XML" role="XML"><![CDATA[<pages> 
   ... 
   <page view-id="/entry.xhtml" action="#{entryAction.loadBlogEntry}"> 
   <param name="blogEntryId" value="#{blogEntry.id}"/> 




More information about the jboss-cvs-commits mailing list