coliver     2003/07/27 09:10:59

  Modified:    src/documentation/xdocs/userdocs/flow api.xml
  Log:
  Moved FOM section before Calling Java section
  
  Revision  Changes    Path
  1.22      +60 -54    cocoon-2.1/src/documentation/xdocs/userdocs/flow/api.xml
  
  Index: api.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/api.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- api.xml   26 Jul 2003 19:29:07 -0000      1.21
  +++ api.xml   27 Jul 2003 16:10:59 -0000      1.22
  @@ -16,64 +16,11 @@
           <link 
href="http://cvs.cocoondev.org/cgi-bin/viewcvs.cgi/?cvsroot=rhino";>extended</link>
           version of <link href="http://www.mozilla.org/rhino";>Mozilla 
Rhino</link> that supports continuations.</p>
     <s2 title="Table of Contents">
  -   <p><link href="#Java">Calling Java</link></p>
      <p><link href="#FOM">Flow Object Model</link></p>
  +   <p><link href="#Java">Calling Java</link></p>
     </s2>
      <p/>
       </s1>
  -    <anchor id="Java"/><s1 title="Calling Java">
  -    <p>
  -    You can easily call any Java code from your Flowscripts, for example:
  -    </p>
  -    <source>
  -    var map = new java.util.HashMap();
  -    map.put("foo", "bar");
  -    </source>
  -
  -    <p>Classes in packages under <code>java</code> are accessible directly 
in your scripts.</p>
  -    <p>Note that classes under <code>java.lang</code> are not automatically 
imported, however:</p>
  -
  -    <source>var n = new java.lang.Integer(3);</source>
  -
  -    <p>All other java packages and classes are accessible under the property 
<code>Packages</code>:</p>
  -
  -    <source>var tree = new Packages.javax.swing.JTree();</source>
  -
  -    <p>You can get the effect of Java imports using the 
<code>importPackage()</code> and <code>importClass()</code> functions:</p>
  -    <table>
  -     <tr>
  -       <td>
  -       In Java:
  -       </td>
  -       <td>
  -       In JavaScript:
  -       </td>
  -     </tr>
  -     <tr>
  -       <td>
  -       import foo.*;
  -       </td>
  -       <td>
  -       importPackage(Packages.foo);
  -       </td>
  -     </tr>
  -     <tr>
  -       <td>
  -       import foo.Bar;
  -       </td>
  -       <td>
  -       importClass(Packages.foo.Bar);
  -       </td>
  -     </tr>
  -    </table>
  -    <p>
  -      If your Java classes have getters and setters you can access them as 
properties in JavaScript:</p>
  -      <source>
  -              var d = new java.util.Date();
  -              d.year = 2003;    // same effect as d.setYear(2003);
  -      </source>     
  -      <p/>
  -    </s1>
       <anchor id="FOM"/><s1 title="Flow Object Model">
         <p>Cocoon provides a set of system objects for use by Flowscripts. We 
call this set of objects the <em>Flow Object Model</em> (FOM).
         The Flow Object Model consists of the following objects:</p>
  @@ -745,6 +692,65 @@
       </p>
       </s3>
       </s2>
  +    </s1>
  +    <anchor id="Java"/><s1 title="Calling Java">
  +    <p>
  +    You can easily call any Java code from your Flowscripts, for example:
  +    </p>
  +    <source>
  +    var map = new java.util.HashMap();
  +    map.put("foo", "bar");
  +    </source>
  +
  +    <p>Classes in packages under <code>java</code> are accessible directly 
in your scripts.</p>
  +    <p>Note that classes under <code>java.lang</code> are not automatically 
imported, however:</p>
  +
  +    <source>var n = new java.lang.Integer(3);</source>
  +
  +    <p>All other java packages and classes are accessible under the property 
<code>Packages</code>:</p>
  +
  +    <source>var tree = new Packages.javax.swing.JTree();</source>
  +
  +    <p>You can get the effect of Java imports using the 
<code>importPackage()</code> and <code>importClass()</code> functions:</p>
  +    <table>
  +     <tr>
  +       <td>
  +       In Java:
  +       </td>
  +       <td>
  +       In JavaScript:
  +       </td>
  +     </tr>
  +     <tr>
  +       <td>
  +       import foo.*;
  +       </td>
  +       <td>
  +       importPackage(Packages.foo);
  +       </td>
  +     </tr>
  +     <tr>
  +       <td>
  +       import foo.Bar;
  +       </td>
  +       <td>
  +       importClass(Packages.foo.Bar);
  +       </td>
  +     </tr>
  +    </table>
  +    <p>Example:</p>
  +     <source>
  +    importPackage(java.util);   
  +    var set = new TreeSet();</source>     
  +    <p>
  +    </p>
  +    <p>
  +      If your Java classes have getters and setters you can access them as 
properties in JavaScript:</p>
  +<source>
  +    var d = new java.util.Date();
  +    d.year = 2003;    // same effect as d.setYear(2003);
  +</source>     
  +      <p/>
       </s1>
     </body>
   </document>
  
  
  

Reply via email to