How to Support More Scripting Languages

From Documentation
Revision as of 07:34, 16 July 2010 by Maya001122 (talk | contribs) (Created page with '{{ZKDevelopersGuidePageHeader}} Currently ZK supports Java, JavaScript, Ruby and Groovy. However, it is easy to extend: # Provides a class that implements the <javadoc type="in…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
How to Support More Scripting Languages


Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


Currently ZK supports Java, JavaScript, Ruby and Groovy. However, it is easy to extend:

  1. Provides a class that implements the Interpreter interface. Instead of implementing it directly, you can derive from the GenericInterpreter class, if you'd like to handle namespaces directly. Or, you can derive from the BSFInterpreter class, if the interpreter supports BSF (Bean Scripting Framework).
  2. Declares the scripting language in either WEB-INF/zk.xml, or zk/config.xml.
<zscript-config>
        <language-name>SuperJava</language-name><!-- case insensitive -->
        <interpreter-class>my.MySuperJavaInterpreter</interpreter-class>    
</zscript-config>

Refer to the Developer's Reference for the details about WEB-INF/zk.xml. Refer to the Component Development Guide for the details about zk/config.xml.



Last Update : 2010/07/16

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.