cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Advanced Control Flow - Java
Date Fri, 14 Oct 2005 13:23:16 GMT
A document has been updated:

http://cocoon.zones.apache.org/daisy/legacydocs/513.html

Document ID: 513
Branch: main
Language: default
Name: Advanced Control Flow - Java (previously Advanced Control Flow)
Document Type: Document (unchanged)
Updated on: 10/14/05 1:22:57 PM
Updated by: Helma van der Linden

A new version has been created, state: publish

Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 3700 bytes (previous version: 3671 bytes)
Content diff:
(4 equal lines skipped)
    
    <p>You can easily call Java code from your Flowscripts, for example:</p>
    
--- <pre>
---     var map = new java.util.HashMap();
+++ <pre>    var map = new java.util.HashMap();
        map.put("foo", "bar");
        </pre>
    
(16 equal lines skipped)
    and <tt>importClass()</tt> functions:</p>
    
    <table>
+++ <tbody>
    <tr>
    <td>
    <p>In Java:</p>
(18 equal lines skipped)
    <p>importClass(Packages.foo.Bar);</p>
    </td>
    </tr>
+++ </tbody>
    </table>
    
    <p>Example:</p>
    
--- <pre>
---     importPackage(java.util);   
+++ <pre>    importPackage(java.util);   
        var set = new TreeSet();</pre>
    
    <h2>Bean Properties</h2>
    
    <p>If your Java classes have getters and setters you can access them as
    properties in JavaScript:</p>
    
--- <pre>
---     var d = new java.util.Date();
+++ <pre>    var d = new java.util.Date();
        d.year = 2003;    // same effect as d.setYear(2003);
    </pre>
    
(8 equal lines skipped)
    <p>Example:</p>
    
    <pre>
--- 
          // Cause com.xyz.MyClass to be compiled and loaded:
          importClass(Packages.com.xyz.MyClass); 
    
(12 equal lines skipped)
    value <tt>"javascript"</tt>. The following properties may be set:</p>
    
    <table>
+++ <tbody>
    <tr>
    <td>
    <p>Property:</p>
(29 equal lines skipped)
    files</p>
    </td>
    </tr>
+++ </tbody>
    </table>
    
    <p>Example:</p>
    
--- <pre>
---   &lt;flow-interpreters default="javascript" logger="flow"&gt;
+++ <pre>  &lt;flow-interpreters default="javascript" logger="flow"&gt;
        &lt;!-- FOM (Flow Object Model) --&gt;
        &lt;component-instance 
    class="org.apache.cocoon.components.flow.
(13 equal lines skipped)


Fields
======
no changes

Links
=====
no changes

Custom Fields
=============
no changes

Collections
===========
no changes

Mime
View raw message