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

Shane Bryzak sbryzak at redhat.com
Tue Jul 3 23:37:09 EDT 2007


  User: sbryzak2
  Date: 07/07/03 23:37:09

  Modified:    doc/reference/en/modules  remoting.xml
  Log:
  documented Seam.Remoting.eval()
  
  Revision  Changes    Path
  1.27      +26 -0     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.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- remoting.xml	4 Jul 2007 02:50:11 -0000	1.26
  +++ remoting.xml	4 Jul 2007 03:37:09 -0000	1.27
  @@ -261,6 +261,32 @@
     </sect1>
   
     <sect1>
  +    <title>Evaluating EL Expressions</title>
  +    
  +    <para>
  +      Seam Remoting also supports the evaluation of EL expressions, which provides another convenient method for retrieving
  +      data from the server.  Using the <literal>Seam.Remoting.eval()</literal> function, an EL expression can be remotely
  +      evaluated on the server and the resulting value returned to a client-side callback method.  This function accepts two
  +      parameters, the first being the EL expression to evaluate, and the second being the callback method to invoke with the
  +      value of the expression.  Here's an example:
  +    </para>
  +    
  +    <programlisting><![CDATA[  function customersCallback(customers) {
  +    for (var i = 0; i < customers.length; i++) {
  +      alert("Got customer: " + customers[i].getName());
  +    }    
  +  }
  +    
  +  Seam.Remoting.eval("#{customers}", customersCallback);  
  +    ]]></programlisting>
  +    
  +    <para>
  +      In this example, the expression <literal>#{customers}</literal> is evaluated by Seam, and the value of the expression
  +      (in this case a list of Customer objects) is returned to the <literal>customersCallback()</literal> method.
  +    </para>
  +  </sect1>
  +
  +  <sect1>
       <title>Client Interfaces</title>
   
       <para> In the configuration section above, the interface, or "stub" for our component is imported into our page via
  
  
  



More information about the jboss-cvs-commits mailing list