Advanced Control Flow - Java
- +Calling Java
You can easily call Java code from your Flowscripts, for example:
var map = new java.util.HashMap(); map.put("foo", "bar");- +
Imports
Classes in packages under java are accessible directly in your scripts.
@@ -1289,14 +1287,14 @@Example:
importPackage(java.util); var set = new TreeSet();- +
Bean Properties
If your Java classes have getters and setters you can access them as properties in JavaScript:
var d = new java.util.Date(); d.year = 2003; // same effect as d.setYear(2003);- +
Dynamic Compilation
Cocoon includes an embedded Java compiler that can dynamically compile Java source files and load and execute the resulting classes at runtime. During @@ -1313,7 +1311,7 @@ obj.someMethod(); // call a method - +
Configuration
You control this behavior by specifying configuration properties in the cocoon.xconf file located in the WEB-INF/ directory of your Modified: cocoon/site/site/2.1/userdocs/flow/jpath.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/flow/jpath.html?rev=377949&r1=377948&r2=377949&view=diff ============================================================================== --- cocoon/site/site/2.1/userdocs/flow/jpath.html (original) +++ cocoon/site/site/2.1/userdocs/flow/jpath.html Tue Feb 14 22:36:05 2006 @@ -1203,9 +1203,7 @@ -
+