[jboss-cvs] JBossAS SVN: r105544 - 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
Tue Jun 1 23:57:31 EDT 2010


Author: misty at redhat.com
Date: 2010-06-01 23:57:30 -0400 (Tue, 01 Jun 2010)
New Revision: 105544

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

Modified: projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Gwt.xml
===================================================================
--- projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Gwt.xml	2010-06-02 03:54:34 UTC (rev 105543)
+++ projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Gwt.xml	2010-06-02 03:57:30 UTC (rev 105544)
@@ -29,17 +29,17 @@
 			To prepare a Seam component to be called with GWT, you must first create both synchronous and asynchronous service interfaces for the methods you wish to call. Both interfaces should extend the GWT interface <literal>com.google.gwt.user.client.rpc.RemoteService</literal>:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[public interface MyService extends RemoteService { 
+<programlisting language="Java" role="JAVA">public interface MyService extends RemoteService { 
   public String askIt(String question);      
-}]]>
+}
 </programlisting>
 		 <para>
 			The asynchronous interface should be identical, except for an additional <literal>AsyncCallback</literal> parameter for each of the methods it declares:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[public interface MyServiceAsync extends RemoteService { 
+<programlisting language="Java" role="JAVA">public interface MyServiceAsync extends RemoteService { 
   public void askIt(String question, AsyncCallback callback); 
-}]]>
+}
 </programlisting>
 		 <para>
 			The asynchronous interface (in this case, <literal>MyServiceAsync</literal>) is implemented by GWT, and should never be implemented directly.
@@ -48,7 +48,7 @@
 			The next step is to create a Seam component that implements the synchronous interface:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[@Name("org.jboss.seam.example.remoting.gwt.client.MyService")
+<programlisting language="Java" role="JAVA">@Name("org.jboss.seam.example.remoting.gwt.client.MyService")
 public class ServiceImpl implements MyService {
 
   @WebRemote
@@ -66,7 +66,7 @@
     ValidationUtility util = new ValidationUtility();
     return util.isValid(q);
   }
-}]]>
+}
 </programlisting>
 		 <para>
 			The Seam component&#39;s name must match the fully-qualified name of the GWT client interface (as shown), or the Seam Resource Servlet will not be able to find it when a client makes a GWT call. Methods that GWT will make accessible must be annotated with <literal>@WebRemote</literal>.
@@ -79,19 +79,19 @@
 			Next, write a method that returns the asynchronous interface to the component. This method can be located inside the widget class, and will be used by the widget to obtain a reference to the asynchronous client stub:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[private MyServiceAsync getService() {       
+<programlisting language="Java" role="JAVA">private MyServiceAsync getService() {       
   String endpointURL = GWT.getModuleBaseURL() + "seam/resource/gwt";      
       
   MyServiceAsync svc = (MyServiceAsync) GWT.create(MyService.class);
   ((ServiceDefTarget) svc).setServiceEntryPoint(endpointURL);
   return svc;     
-}]]>
+}
 </programlisting>
 		 <para>
 			Finally, write the widget code that invokes the method on the client stub. The following example creates a simple user interface with a label, text input, and a button:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[public class AskQuestionWidget extends Composite {
+<programlisting language="Java" role="JAVA">public class AskQuestionWidget extends Composite {
   private AbsolutePanel panel = new AbsolutePanel();
    
   public AskQuestionWidget() {      
@@ -130,7 +130,7 @@
   });      
 }
    
-...]]>
+...
 </programlisting>
 		 <para>
 			When clicked, this button invokes the <literal>askServer()</literal> method, passing the contents of the input text. In this example, it also validates that the input is a valid question. The <literal>askServer()</literal> method acquires a reference to the asynchronous client stub (returned by the <literal>getService()</literal> method) and invokes the <literal>askIt()</literal> method. The result (or error message, if the call fails) is shown in an alert window.
@@ -157,7 +157,7 @@
 			Place the following near the top of your Ant file:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<taskdef uri="antlib:de.samaflost.gwttasks" 
+<programlisting language="XML" role="XML"><![CDATA[<taskdef uri="antlib:de.samaflost.gwttasks" 
          resource="de/samaflost/gwttasks/antlib.xml" 
          classpath="./lib/gwttasks.jar"/> 
 <property file="build.properties"/>]]>
@@ -166,13 +166,13 @@
 			Create a <filename>build.properties</filename> file containing:
 		</para>
 		 
-<programlisting><![CDATA[gwt.home=/gwt_home_dir]]>
-</programlisting>
+<screen>gwt.home=/gwt_home_dir</screen>
+
 		 <para>
 			This must point to the directory in which GWT is installed. Next, create a target:
 		</para>
 		 
-<programlisting role="XML"><![CDATA[<!-- the following are are handy utilities for doing GWT development.
+<programlisting language="XML" role="XML"><![CDATA[<!-- the following are are handy utilities for doing GWT development.
      To use GWT, you will of course need to download GWT seperately -->
      
 <target name="gwt-compile">




More information about the jboss-cvs-commits mailing list