[jboss-cvs] jboss-seam/doc/reference/en/modules ...

Norman Richards norman.richards at jboss.com
Tue May 29 15:52:05 EDT 2007


  User: nrichards
  Date: 07/05/29 15:52:05

  Modified:    doc/reference/en/modules      configuration.xml
                        conversations.xml jms.xml remoting.xml spring.xml
  Log:
  doc updates
  
  Revision  Changes    Path
  1.48      +81 -82    jboss-seam/doc/reference/en/modules/configuration.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: configuration.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/configuration.xml,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -b -r1.47 -r1.48
  --- configuration.xml	22 May 2007 02:18:16 -0000	1.47
  +++ configuration.xml	29 May 2007 19:52:05 -0000	1.48
  @@ -143,13 +143,7 @@
                   </para>
   
                   <programlisting><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
  -            xmlns:core="http://jboss.com/products/seam/core"
  -            xmlns:web="http://jboss.com/products/seam/web"
  -            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  -            xsi:schemaLocation=
  -                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.3.xsd
  -                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.3.xsd
  -                 http://jboss.com/products/seam/web http://jboss.com/products/seam/web-1.3.xsd">
  +            xmlns:web="http://jboss.com/products/seam/web">
   
       <web:exception-filter url-pattern="*.seam"/>
   
  @@ -289,8 +283,6 @@
           enable-cache="true" 
           log4j-init-file="custom-log4j.xml"
           url-pattern="*.seam"/>]]></programlisting>
  -
  --	
                   <itemizedlist>
                       <listitem>
                           <para>
  @@ -388,13 +380,14 @@
   @Intercept(NEVER)
   @Filter(within="org.jboss.seam.web.ajax4jsfFilter")
   public class MultipartFilter extends AbstractFilter {]]></programlisting>
  -            </sect3>
  +          
                   
   			<para>
   			Adding the <literal>@Startup</literal> annotation means thar the component is available during 
   			Seam startup; bijection isn't available here (<literal>@Intercept(NEVER)</literal>); and the filter should be
   			further down the chain than the Ajax4jsf filter (<literal>@Filter(within="org.jboss.seam.web.ajax4jsfFilter")</literal>).
   			</para>
  +            </sect3>
           </sect2>
   
           <sect2>
  @@ -402,15 +395,24 @@
   
           <para>
               We need to apply the <literal>SeamInterceptor</literal> to our Seam
  -            components. The simplest way to do this is to add the
  -            following interceptor binding to the <literal>&lt;assembly-descriptor&gt;</literal>
  -            in <literal>ejb-jar.xml</literal>:
  +            components. The simplest way to do this across an entire application is
  +            to add the following interceptor configuration in <literal>ejb-jar.xml</literal>:
           </para>
   
  -<programlisting><![CDATA[<interceptor-binding>
  +<programlisting><![CDATA[    
  +<interceptors>
  +    <interceptor>
  +        <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
  +    </interceptor>
  +</interceptors>
  +   
  +<assembly-descriptor>
  +    <interceptor-binding>
       <ejb-name>*</ejb-name>
       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
  -</interceptor-binding>]]></programlisting>
  +      </interceptor-binding>
  +   </assembly-descriptor>
  +]]></programlisting>
   
           <para>
               Seam needs to know where to go to find session beans in JNDI.
  @@ -535,8 +537,7 @@
   
               <programlisting><![CDATA[my-application.ear/
       jboss-seam.jar
  -    el-api.jar
  -    el-ri.jar
  +    jboss-el.jar
       META-INF/
           MANIFEST.MF
           application.xml
  @@ -569,9 +570,9 @@
                       ...]]></programlisting>
   
               <para>
  -                You must include <literal>jboss-seam.jar</literal>, <literal>el-api.jar</literal> and
  +                You must include <literal>jboss-seam.jar</literal>, <literal>jboss-el.jar</literal> and
                   <literal>el-ri.jar</literal> in the EAR classpath. Make sure you reference all of these
  -                jars from <literal>application.xml</literal>.
  +                JARs from <literal>application.xml</literal>.
               </para>
   
               <para>
  @@ -604,8 +605,6 @@
                   container that supports EJB 3.0.
               </para>
   
  -        </sect2>
  -
           <para>
               I really wish that was all there was to say on the topic of configuration but
               unfortunately we're only about a third of the way there. If you're too overwhelmed
  @@ -613,6 +612,8 @@
               and come back to it later.
           </para>
   
  +         </sect2>
  +            
       </sect1>
   
       <sect1>
  @@ -737,11 +738,10 @@
           lib/
               jboss-seam.jar
               jboss-seam-ui.jar
  -            el-api.jar
  -            el-ri.jar
  +            jboss-el.jar
               jsf-facelets.jar
  -            myfaces-api.jar
  -            myfaces-impl.jar
  +            jsf-api.jar
  +            jsf-impl.jar
               jboss-ejb3.jar
               jboss-jca.jar
               jboss-j2ee.jar
  @@ -900,13 +900,13 @@
       register.jsp
       ...]]></programlisting>
   
  -        </sect2>
   
           <para>
               If we want to deploy Hibernate in a non-J2EE environment like Tomcat or TestNG, we
               need to do a little bit more work.
           </para>
   
  +        </sect2>
       </sect1>
   
       <sect1>
  @@ -970,14 +970,16 @@
   
      <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/>
   
  -   <bean name="TransactionManagerFactory" class="org.jboss.seam.microcontainer.TransactionManagerFactory"/>
  +   <bean name="TransactionManagerFactory" 
  +         class="org.jboss.seam.microcontainer.TransactionManagerFactory"/>
      <bean name="TransactionManager" class="java.lang.Object">
         <constructor factoryMethod="getTransactionManager">
            <factory bean="TransactionManagerFactory"/>
         </constructor>
      </bean>
   
  -   <bean name="bookingDatasourceFactory" class="org.jboss.seam.microcontainer.DataSourceFactory">
  +   <bean name="bookingDatasourceFactory" 
  +         class="org.jboss.seam.microcontainer.DataSourceFactory">
         <property name="driverClass">org.hsqldb.jdbcDriver</property>
         <property name="connectionUrl">jdbc:hsqldb:.</property>
         <property name="userName">sa</property>
  @@ -994,7 +996,8 @@
         </constructor>
      </bean>
   
  -   <bean name="bookingSessionFactoryFactory" class="org.jboss.seam.microcontainer.HibernateFactory"/>
  +   <bean name="bookingSessionFactoryFactory" 
  +         class="org.jboss.seam.microcontainer.HibernateFactory"/>
      <bean name="bookingSessionFactory" class="java.lang.Object">
         <constructor factoryMethod="getSessionFactory">
            <factory bean="bookingSessionFactoryFactory"/>
  @@ -1023,16 +1026,15 @@
           lib/
               jboss-seam.jar
               jboss-seam-ui.jar
  -            el-api.jar
  -            el-ri.jar
  +            jboss-el.jar
               jsf-facelets.jar
               hibernate3.jar
               ...
               jboss-microcontainer.jar
               jboss-jca.jar
               ...
  -            myfaces-api.jar
  -            myfaces-impl.jar
  +            jsf-api.jar
  +            jsf-impl.jar
               mc-conf.jar/
                   jndi.properties
                   log4j.xml
  @@ -1099,7 +1101,8 @@
       <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
       <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
       <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
  -    <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
  +    <service name="authentication" 
  +             factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
     </jbpm-context>
   
   </jbpm-configuration>]]></programlisting>
  @@ -1122,8 +1125,7 @@
   
           <programlisting><![CDATA[my-application.ear/
       jboss-seam.jar
  -    el-api.jar
  -    el-ri.jar
  +    jboss-el.jar
       jbpm-3.1.jar
       META-INF/
           MANIFEST.MF
  @@ -1212,8 +1214,7 @@
               cache configuration:
           </para>
           
  -        <programlisting><![CDATA[
  -      <container-cache-conf>
  +        <programlisting><![CDATA[<container-cache-conf>
           <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>
           <cache-policy-conf>
             <min-capacity>50</min-capacity>
  @@ -1230,7 +1231,7 @@
             <min-cache-miss-period>1</min-cache-miss-period>
             <cache-load-factor>0.75</cache-load-factor>
           </cache-policy-conf>
  -      </container-cache-conf>]]></programlisting>    
  +</container-cache-conf>]]></programlisting>    
         
           <para>
               The default HTTP session timeout can be modified in 
  @@ -1240,12 +1241,10 @@
               timeout for all web applications:
           </para>    
           
  -        <programlisting><![CDATA[
  -   <session-config>
  +        <programlisting><![CDATA[<session-config>
         <!-- HTTP Session timeout, in minutes -->
         <session-timeout>30</session-timeout>
  -   </session-config>        
  -        ]]></programlisting>
  +</session-config>]]></programlisting>
           
           <para>
               To override this value for your own application, simply include this entry in
  
  
  
  1.28      +16 -17    jboss-seam/doc/reference/en/modules/conversations.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: conversations.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/conversations.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- conversations.xml	27 Feb 2007 00:03:28 -0000	1.27
  +++ conversations.xml	29 May 2007 19:52:05 -0000	1.28
  @@ -621,11 +621,11 @@
               </para>
               </listitem>
               <listitem>
  +                <para>
                   Include one or more of the standard workspace switcher JSP
                   or facelets fragments in your pages. The standard fragments
                   support workspace management via a drop down menu, a list
                   of conversations, or breadcrumbs.
  -            <para>
               </para>
               </listitem>
           </itemizedlist>
  @@ -814,14 +814,13 @@
             </imageobject>
           </mediaobject>
           
  -        </section>
  -        
           <para>
               Please refer to the Seam Issue Tracker demo to see all this functionality 
               in action!
           </para>
           
       </section>
  +    </section>
       
       <section>
           <title>Conversational components and JSF component bindings</title>
  
  
  
  1.14      +14 -6     jboss-seam/doc/reference/en/modules/jms.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: jms.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/jms.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- jms.xml	20 Feb 2007 14:31:48 -0000	1.13
  +++ jms.xml	29 May 2007 19:52:05 -0000	1.14
  @@ -112,7 +112,9 @@
       public void processScheduledPayment(Payment payment, @Expiration Date date);
   
       @Asynchronous
  -    public void processRecurringPayment(Payment payment, @Expiration Date date, @IntervalDuration Long interval)'
  +    public void processRecurringPayment(Payment payment, 
  +                                        @Expiration Date date, 
  +                                        @IntervalDuration Long interval)'
   }]]></programlisting>
           
           <programlisting><![CDATA[@Stateful
  @@ -130,7 +132,8 @@
   
       public String scheduleRecurringPayment()
       {
  -        paymentHandler.processRecurringPayment( new Payment(bill), bill.getDueDate(), ONE_MONTH );
  +        paymentHandler.processRecurringPayment( new Payment(bill), bill.getDueDate(), 
  +                                                ONE_MONTH );
           return "success";
       }
   }]]></programlisting>
  @@ -171,7 +174,8 @@
       
       public String schedulePayment()
       {
  -        Timer timer = paymentHandler.processScheduledPayment( new Payment(bill), bill.getDueDate() );
  +        Timer timer = paymentHandler.processScheduledPayment( new Payment(bill), 
  +                                                              bill.getDueDate() );
           return "success";
       }
   }]]></programlisting>
  @@ -230,9 +234,13 @@
               <literal>QueueSender</literal>s:
           </para>
           
  -        <programlisting><![CDATA[<jms:managed-topic-publisher name="stockTickerPublisher" auto-create="true" topic-jndi-name="topic/stockTickerTopic"/>
  -
  -<jms:managed-queue-sender name="paymentQueueSender" auto-create="true" queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
  +        <programlisting><![CDATA[<jms:managed-topic-publisher name="stockTickerPublisher" 
  +                                                              auto-create="true" 
  +                                                              topic-jndi-name="topic/stockTickerTopic"/>
  +
  +<jms:managed-queue-sender name="paymentQueueSender" 
  +                          auto-create="true" 
  +                          queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
   
       </sect2>
   
  
  
  
  1.24      +135 -225  jboss-seam/doc/reference/en/modules/remoting.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: remoting.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/remoting.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- remoting.xml	23 May 2007 23:34:26 -0000	1.23
  +++ remoting.xml	29 May 2007 19:52:05 -0000	1.24
  @@ -10,29 +10,21 @@
       <title>Configuration</title>
       <para> To use remoting, the Seam Resource servlet must first be configured in your <literal>web.xml</literal> file: </para>
   
  -    <programlisting>
  -          <![CDATA[
  -  <servlet>
  +    <programlisting><![CDATA[<servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
  -  </servlet>
  +</servlet>
   
  -  <servlet-mapping>
  +<servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
  -  </servlet-mapping>
  -        ]]>
  -        </programlisting>
  +</servlet-mapping>]]></programlisting>
   
       <para> The next step is to import the necessary Javascript into your web page. There are a minimum of two scripts
         that must be imported. The first one contains all the client-side framework code that enables remoting
         functionality: </para>
   
  -    <programlisting>
  -          <![CDATA[
  -  <script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
  -            ]]>
  -        </programlisting>
  +    <programlisting><![CDATA[<script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>]]></programlisting>
   
       <para> The second script contains the stubs and type definitions for the components you wish to call. It is
         generated dynamically based on the local interface of your components, and includes type definitions for all of
  @@ -40,20 +32,14 @@
         name of your component. For example, if you have a stateless session bean annotated with
           <literal>@Name("customerAction")</literal>, then your script tag should look like this: </para>
   
  -    <programlisting>
  -          <![CDATA[
  -  <script type="text/javascript" src="seam/resource/remoting/interface.js?customerAction"></script>
  -        ]]>
  -        </programlisting>
  +    <programlisting><![CDATA[<script type="text/javascript" 
  +          src="seam/resource/remoting/interface.js?customerAction"></script>]]></programlisting>
   
       <para> If you wish to access more than one component from the same page, then include them all as parameters of your
         script tag: </para>
   
  -    <programlisting>
  -          <![CDATA[
  -  <script type="text/javascript" src="seam/resource/remoting/interface.js?customerAction&accountAction"></script>
  -        ]]>
  -        </programlisting>
  +    <programlisting><![CDATA[<script type="text/javascript" 
  +        src="seam/resource/remoting/interface.js?customerAction&accountAction"></script>]]></programlisting>
   
     </sect1>
   
  @@ -72,54 +58,37 @@
         <para> Let's step through a simple example to see how the <literal>Seam</literal> object works. First of all,
           let's create a new Seam component called <literal>helloAction</literal>. </para>
   
  -      <programlisting>
  -          <![CDATA[
  -  @Stateless
  -  @Name("helloAction")
  -  public class HelloAction implements HelloLocal {
  +      <programlisting><![CDATA[@Stateless
  + at Name("helloAction")
  +public class HelloAction implements HelloLocal {
       public String sayHello(String name) {
         return "Hello, " + name;
       }
  -  }
  -          ]]>
  -        </programlisting>
  +}]]></programlisting>
   
         <para>You also need to create a local interface for our new component - take special note of the
             <literal>@WebRemote</literal> annotation, as it's required to make our method accessible via remoting:</para>
   
  -      <programlisting>
  -          <![CDATA[
  -  @Local
  -  public interface HelloLocal {
  +      <programlisting><![CDATA[@Local
  +public interface HelloLocal {
       @WebRemote
       public String sayHello(String name);
  -  }
  -          ]]>
  -        </programlisting>
  +}]]></programlisting>
   
         <para> That's all the server-side code we need to write. Now for our web page - create a new page and import the
           following scripts: </para>
   
  -      <programlisting>
  -          <![CDATA[
  -  <script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
  -  <script type="text/javascript" src="seam/resource/remoting/interface.js?helloAction"></script>
  -          ]]>
  -        </programlisting>
  +      <programlisting><![CDATA[<script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
  +<script type="text/javascript" 
  +        src="seam/resource/remoting/interface.js?helloAction"></script>]]></programlisting>
   
         <para> To make this a fully interactive user experience, let's add a button to our page: </para>
   
  -      <programlisting>
  -          <![CDATA[
  -  <button onclick="javascript:sayHello()">Say Hello</button>
  -          ]]>
  -        </programlisting>
  +      <programlisting><![CDATA[<button onclick="javascript:sayHello()">Say Hello</button>]]></programlisting>
   
         <para> We'll also need to add some more script to make our button actually do something when it's clicked: </para>
   
  -      <programlisting>
  -          <![CDATA[
  -  <script type="text/javascript">
  +      <programlisting><![CDATA[<script type="text/javascript">
       //<![CDATA[
   
       function sayHello() {
  @@ -132,9 +101,7 @@
       }
   
       // ]]>]]&gt;<![CDATA[
  -  </script>
  -          ]]>
  -        </programlisting>
  +</script>]]></programlisting>
   
         <para> We're done! Deploy your application and browse to your page. Click the button, and enter a name when
           prompted. A message box will display the hello message confirming that the call was successful. If you want to
  @@ -146,9 +113,7 @@
           responsible for prompting the user for their name and then making a remote request. Take a look at the following
           line: </para>
   
  -      <programlisting>
  -  Seam.Component.getInstance("helloAction").sayHello(name, sayHelloCallback);
  -        </programlisting>
  +      <programlisting>Seam.Component.getInstance("helloAction").sayHello(name, sayHelloCallback);</programlisting>
   
         <para> The first section of this line, <literal>Seam.Component.getInstance("helloAction")</literal> returns a
           proxy, or "stub" for our <literal>helloAction</literal> component. We can invoke the methods of our component
  @@ -183,11 +148,10 @@
             method will have the same getter/setter methods as its server-side counterpart, or alternatively if you wish
             you can access its fields directly. Take the following Seam entity component for example: </para>
   
  -        <programlisting>
  -  @Name("customer")
  -  @Entity
  -  public class Customer implements Serializable
  -  {
  +        <programlisting>@Name("customer")
  + at Entity
  +public class Customer implements Serializable
  +{
       private Integer customerId;
       private String firstName;
       private String lastName;
  @@ -215,22 +179,17 @@
       public void setLastName(String lastName) {
         this.lastName = lastName;
       }
  -  }
  -          </programlisting>
  +}</programlisting>
   
           <para> To create a client-side Customer you would write the following code: </para>
   
  -        <programlisting>
  -  var customer = Seam.Component.newInstance("customer");
  -          </programlisting>
  +        <programlisting>var customer = Seam.Component.newInstance("customer");</programlisting>
   
           <para> Then from here you can set the fields of the customer object: </para>
   
  -        <programlisting>
  -  customer.setFirstName("John");
  -  // Or you can set the fields directly
  -  customer.lastName = "Smith";
  -          </programlisting>
  +        <programlisting>customer.setFirstName("John");
  +// Or you can set the fields directly
  +customer.lastName = "Smith";</programlisting>
   
         </sect3>
   
  @@ -246,9 +205,7 @@
             to save it, we would pass it to the <literal>saveCustomer()</literal> method of our
             <literal>customerAction</literal> component: </para>
   
  -        <programlisting>
  -  Seam.Component.getInstance("customerAction").saveCustomer(customer);          
  -          </programlisting>
  +        <programlisting>Seam.Component.getInstance("customerAction").saveCustomer(customer);</programlisting>
         </sect3>
   
         <sect3>
  @@ -257,12 +214,10 @@
           <para> Passing an object into this method will return its component name if it is a component, or
             <literal>null</literal> if it is not. </para>
   
  -        <programlisting>
  -  if (Seam.Component.getComponentName(instance) == "customer")
  +        <programlisting>if (Seam.Component.getComponentName(instance) == "customer")
       alert("Customer");
  -  else if (Seam.Component.getComponentName(instance) == "staff")
  -    alert("Staff member");          
  -          </programlisting>
  +else if (Seam.Component.getComponentName(instance) == "staff")
  +  alert("Staff member");</programlisting>
         </sect3>
   
       </sect2>
  @@ -282,9 +237,7 @@
             <literal>createType()</literal> method to create an instance of your type. Pass in the fully qualified Java
             class name as a parameter: </para>
   
  -        <programlisting>
  -  var widget = Seam.Remoting.createType("com.acme.widgets.MyWidget");          
  -          </programlisting>
  +        <programlisting>var widget = Seam.Remoting.createType("com.acme.widgets.MyWidget");</programlisting>
         </sect3>
   
         <sect3>
  @@ -303,11 +256,8 @@
       <para> In the configuration section above, the interface, or "stub" for our component is imported into our page via
           <literal>seam/resource/remoting/interface.js</literal>: </para>
   
  -    <programlisting>
  -        <![CDATA[
  -  <script type="text/javascript" src="seam/resource/remoting/interface.js?customerAction"></script>
  -        ]]>
  -      </programlisting>
  +    <programlisting><![CDATA[<script type="text/javascript" 
  +        src="seam/resource/remoting/interface.js?customerAction"></script>]]></programlisting>
   
       <para> By including this script in our page, the interface definitions for our component, plus any other components
         or types that are required to execute the methods of our component are generated and made available for the
  @@ -334,7 +284,7 @@
   
       <sect2>
         <title>Setting and reading the Conversation ID</title>
  -    </sect2>
  +
   
       <para> If you intend on using remote calls within the scope of a conversation then you need to be able to read or
         set the conversation ID in the Seam Remoting Context. To read the conversation ID after making a remote request
  @@ -346,7 +296,7 @@
         first valid conversation ID that is returned by any remoting call. If you are working with multiple conversations
         within your page, then you may need to explicitly set the conversation ID before each call. If you are working
         with just a single conversation, then you don't need to do anything special. </para>
  -      
  +    </sect2>      
       <sect2>
         <title>Remote calls within the current conversation scope</title>
         
  @@ -355,8 +305,7 @@
           of the view before making the remote call.  This small snippet of JavaScript will set the
           conversation ID that is used for remoting calls to the current view's conversation ID: </para>
           
  -      <programlisting><![CDATA[  Seam.Remoting.getContext().setConversationId( #{conversationId} );
  -      ]]></programlisting>
  +      <programlisting><![CDATA[Seam.Remoting.getContext().setConversationId( #{conversationId} );]]></programlisting>
       </sect2>
     </sect1>
   
  @@ -426,25 +375,20 @@
           section. In some situations you may have a component method where the exact parameter type cannot be determined,
           such as: </para>
   
  -      <programlisting>
  -  @Name("myAction")
  -  public class MyAction implements MyActionLocal {
  +      <programlisting>@Name("myAction")
  +public class MyAction implements MyActionLocal {
       public void doSomethingWithObject(Object obj) {
         // code
       }
  -  }
  -        </programlisting>
  +}</programlisting>
   
         <para> In this case you might want to pass in an instance of your <literal>myWidget</literal> component, however
           the interface for <literal>myAction</literal> won't include <literal>myWidget</literal> as it is not directly
           referenced by any of its methods. To get around this, <literal>MyWidget</literal> needs to be explicitly
           imported: </para>
   
  -      <programlisting>
  -          <![CDATA[        
  -  <script type="text/javascript" src="seam/resource/remoting/interface.js?myAction&myWidget"></script>
  -          ]]>
  -        </programlisting>
  +      <programlisting><![CDATA[<script type="text/javascript" 
  +                                       src="seam/resource/remoting/interface.js?myAction&myWidget"></script>]]></programlisting>
   
         <para> This will then allow a <literal>myWidget</literal> object to be created with
             <literal>Seam.Component.newInstance("myWidget")</literal>, which can then be passed to
  @@ -467,23 +411,19 @@
         <para> On the client side, enums are treated the same as Strings. When setting the value for an enum parameter,
           simply use the String representation of the enum. Take the following component as an example: </para>
   
  -      <programlisting>
  -  @Name("paintAction")
  -  public class paintAction implements paintLocal {
  +      <programlisting>@Name("paintAction")
  +public class paintAction implements paintLocal {
       public enum Color {red, green, blue, yellow, orange, purple};
   
       public void paint(Color color) {
         // code
       }    
  -  }            
  -        </programlisting>
  +} </programlisting>
   
         <para> To call the <literal>paint()</literal> method with the color <literal>red</literal>, pass the parameter
           value as a String literal: </para>
   
  -      <programlisting>
  -  Seam.Component.getInstance("paintAction").paint("red");
  -        </programlisting>
  +      <programlisting>Seam.Component.getInstance("paintAction").paint("red");</programlisting>
   
         <para> The inverse is also true - that is, if a component method returns an enum parameter (or contains an enum
           field anywhere in the returned object graph) then on the client-side it will be represented as a String. </para>
  @@ -510,9 +450,7 @@
             the Seam Remoting framework. To create a Map which can be used as a parameter to a remote call, create a new
               <literal>Seam.Remoting.Map</literal> object: </para>
   
  -        <programlisting>
  -  var map = new Seam.Remoting.Map();          
  -          </programlisting>
  +        <programlisting>var map = new Seam.Remoting.Map();</programlisting>
   
           <para> This Javascript implementation provides basic methods for working with Maps: <literal>size()</literal>,
               <literal>isEmpty()</literal>, <literal>keySet()</literal>, <literal>values()</literal>,
  @@ -531,9 +469,7 @@
         the packets send back and forth between the client and server in a popup window. To enable debug mode, either
         execute the <literal>setDebug()</literal> method in Javascript: </para>
   
  -    <programlisting>
  -  Seam.Remoting.setDebug(true);      
  -      </programlisting>
  +    <programlisting>Seam.Remoting.setDebug(true);</programlisting>
   
       <para> Or configure it via components.xml: </para>
   
  @@ -555,9 +491,7 @@
         <para> To change the message from the default "Please Wait..." to something different, set the value of
             <literal>Seam.Remoting.loadingMessage</literal>: </para>
   
  -      <programlisting>
  -  Seam.Remoting.loadingMessage = "Loading...";        
  -        </programlisting>
  +      <programlisting>Seam.Remoting.loadingMessage = "Loading..."; </programlisting>
       </sect2>
   
       <sect2>
  @@ -567,11 +501,9 @@
             <literal>displayLoadingMessage()</literal> and <literal>hideLoadingMessage()</literal> with functions that
           instead do nothing: </para>
   
  -      <programlisting>
  -  // don't display the loading indicator
  -  Seam.Remoting.displayLoadingMessage = function() {};
  -  Seam.Remoting.hideLoadingMessage = function() {};        
  -        </programlisting>
  +      <programlisting>// don't display the loading indicator
  +Seam.Remoting.displayLoadingMessage = function() {};
  +Seam.Remoting.hideLoadingMessage = function() {};</programlisting>
       </sect2>
   
       <sect2>
  @@ -581,15 +513,13 @@
           you want. To do this override the <literal>displayLoadingMessage()</literal> and
           <literal>hideLoadingMessage()</literal> messages with your own implementation: </para>
   
  -      <programlisting>
  -  Seam.Remoting.displayLoadingMessage = function() {
  +      <programlisting>  Seam.Remoting.displayLoadingMessage = function() {
       // Write code here to display the indicator
     };
     
     Seam.Remoting.hideLoadingMessage = function() {
       // Write code here to hide the indicator
  -  };
  -        </programlisting>
  +  };</programlisting>
       </sect2>
     </sect1>
   
  @@ -611,8 +541,7 @@
   
       <para> For all our examples, we'll use the following <literal>Widget</literal> class: </para>
   
  -    <programlisting>
  - at Name("widget")
  +    <programlisting>@Name("widget")
   public class Widget
   {
     private String value;
  @@ -622,8 +551,7 @@
     private List&lt;Widget&gt; widgetList;
     
     // getters and setters for all fields
  -}
  -      </programlisting>
  +}</programlisting>
   
       <sect2>
         <title>Constraining normal fields</title>
  @@ -631,10 +559,8 @@
         <para> If your remote method returns an instance of <literal>Widget</literal>, but you don't want to expose the
             <literal>secret</literal> field because it contains sensitive information, you would constrain it like this: </para>
   
  -      <programlisting>
  -  @WebRemote(exclude = {"secret"})
  -  public Widget getWidget();      
  -        </programlisting>
  +      <programlisting>@WebRemote(exclude = {"secret"})
  +public Widget getWidget(); </programlisting>
   
         <para> The value "secret" refers to the <literal>secret</literal> field of the returned object. Now, suppose that
           we don't care about exposing this particular field to the client. Instead, notice that the
  @@ -643,10 +569,8 @@
           value instead? We can do this by using dot notation to specify this field's path within the result's object
           graph: </para>
   
  -      <programlisting>
  -  @WebRemote(exclude = {"child.secret"})
  -  public Widget getWidget();      
  -        </programlisting>
  +      <programlisting>@WebRemote(exclude = {"child.secret"})
  +public Widget getWidget();</programlisting>
   
       </sect2>
   
  @@ -660,10 +584,8 @@
           <literal>secret</literal> field of the <literal>Widget</literal>s in this list the annotation would look like
           this: </para>
   
  -      <programlisting>
  -  @WebRemote(exclude = {"widgetList.secret"})
  -  public Widget getWidget();      
  -        </programlisting>
  +      <programlisting>@WebRemote(exclude = {"widgetList.secret"})
  +  public Widget getWidget();</programlisting>
   
         <para> To constrain a <literal>Map</literal>'s key or value, the notation is slightly different. Appending
             <literal>[key]</literal> after the <literal>Map</literal>'s field name will constrain the
  @@ -671,10 +593,8 @@
           values. The following example demonstrates how the values of the <literal>widgetMap</literal> field have their
             <literal>secret</literal> field constrained: </para>
   
  -      <programlisting>
  -  @WebRemote(exclude = {"widgetMap[value].secret"})
  -  public Widget getWidget();      
  -        </programlisting>
  +      <programlisting>@WebRemote(exclude = {"widgetMap[value].secret"})
  +public Widget getWidget(); </programlisting>
       </sect2>
   
       <sect2>
  @@ -685,10 +605,8 @@
           Seam component) or the fully qualified class name (only if the object is not a Seam component) and is expressed
           using square brackets: </para>
   
  -      <programlisting>
  -  @WebRemote(exclude = {"[widget].secret"})
  -  public Widget getWidget();      
  -        </programlisting>
  +      <programlisting>@WebRemote(exclude = {"[widget].secret"})
  +public Widget getWidget(); </programlisting>
   
       </sect2>
   
  @@ -697,10 +615,8 @@
   
         <para> Constraints can also be combined, to filter objects from multiple paths within the object graph: </para>
   
  -      <programlisting>
  -  @WebRemote(exclude = {"widgetList.secret", "widgetMap[value].secret"})
  -  public Widget getWidget();      
  -        </programlisting>
  +      <programlisting>@WebRemote(exclude = {"widgetList.secret", "widgetMap[value].secret"})
  +public Widget getWidget();</programlisting>
       </sect2>
   
     </sect1>
  @@ -729,15 +645,13 @@
   
         <para> The following example demonstrates how to subscribe to a JMS Topic: </para>
   
  -      <programlisting>
  -  function subscriptionCallback(message)
  -  {
  +      <programlisting>function subscriptionCallback(message)
  +{
       if (message instanceof Seam.Remoting.TextMessage)
         alert("Received message: " + message.getText());
  -  }        
  +}           
           
  -  Seam.Remoting.subscribe("topicName", subscriptionCallback);
  -        </programlisting>
  +Seam.Remoting.subscribe("topicName", subscriptionCallback);</programlisting>
   
         <para> The <literal>Seam.Remoting.subscribe()</literal> method accepts two parameters, the first being the name of
           the JMS Topic to subscribe to, the second being the callback function to invoke when a message is received. </para>
  @@ -757,9 +671,7 @@
         <para> To unsubscribe from a topic, call <literal>Seam.Remoting.unsubscribe()</literal> and pass in the topic
           name: </para>
   
  -      <programlisting>
  -  Seam.Remoting.unsubscribe("topicName");        
  -        </programlisting>
  +      <programlisting>Seam.Remoting.unsubscribe("topicName");</programlisting>
       </sect2>
   
       <sect2>
  @@ -789,13 +701,11 @@
   
         <para> Via JavaScript: </para>
   
  -      <programlisting>
  -  // Only wait 1 second between receiving a poll response and sending the next poll request.
  -  Seam.Remoting.pollInterval = 1;
  -  
  -  // Wait up to 5 seconds on the server for new messages
  -  Seam.Remoting.pollTimeout = 5;   
  -        </programlisting>
  +      <programlisting>// Only wait 1 second between receiving a poll response and sending the next poll request.
  +Seam.Remoting.pollInterval = 1;
  +  
  +// Wait up to 5 seconds on the server for new messages
  +Seam.Remoting.pollTimeout = 5;   </programlisting>
   
       </sect2>
   
  
  
  
  1.15      +4 -2      jboss-seam/doc/reference/en/modules/spring.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: spring.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/spring.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- spring.xml	24 May 2007 21:57:58 -0000	1.14
  +++ spring.xml	29 May 2007 19:52:05 -0000	1.15
  @@ -315,8 +315,10 @@
           <programlisting><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
               xmlns:spring="http://jboss.com/products/seam/spring"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  -            xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.3.xsd
  -                                http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-1.3.xsd">
  +            xsi:schemaLocation="http://jboss.com/products/seam/components 
  +                                http://jboss.com/products/seam/components-1.3.xsd
  +                                http://jboss.com/products/seam/spring 
  +                                http://jboss.com/products/seam/spring-1.3.xsd">
   
   	<spring:context-loader context-locations="/WEB-INF/applicationContext.xml"/>
   
  
  
  



More information about the jboss-cvs-commits mailing list