Echo2 Plugin
^">
Abstract^
This plugin adds Echo2 capability to a grails application. See
http://www.nextapp.com/platform/echo2/echo/ for Echo2 examples.
^">
Current plugin version: 0.1 ^
Libraries included:
- Echo2_App.jar
- Echo2_WebRender.jar
- Echo2_WebContainer.jar
- Echo2_Chart_App.jar: echo2 charting components http://wiki.nextapp.com/echowiki/Echo2Chart
- Echo2_Chart_WebContainer.jar: plumbing required for charting components
- Echo2_Extras_App.jar: echo2 extras components
- Echo2_Extras_WebContainer.jar: plumbing required for extras components
- Echo2_FileTransfer_App.jar: file transfer components
- Echo2_FileTransfer_WebContainer.jar: plumbing required for file transfer components
- echopointng-2.1.0rc5.jar: EchoPointNG http://wiki.nextapp.com/echowiki/EchoPointNgGuideToComponents
- jcommon-1.0.0.jar
- jfreechart-1.0.0.jar
^">
Command options list ^
|| option || description || usage ||
| create-echo2 | creates an Echo2 application instance class in grails-app/echo2 | grails
create-echo2 <name> |
^">
Installation ^
Download site:
If you use a command of 'grails install-plugin echo2', you don't need to download at all.
This command will download a latest release zip file automatically from
http://plugins.grails.org/grails-echo2.
^">
How to use Echo2 plugin ^
- Create an ApplicationInstance
> grails create-echo2 Hello
- Then edit such as follows:
/*** testapp/grails-app/echo2/HelloApplicationInstance.groovy ***/import nextapp.echo2.app.*;
import nextapp.echo2.app.Window;class HelloApplicationInstance extends ApplicationInstance
{
public Window init()
{
Window window = new Window();
window.setTitle("HelloApplicationInstance"); ContentPane contentPane = new ContentPane();
window.setContent(contentPane); contentPane.add(new Label("HelloApplicationInstance")); return window;
}
}/********************************************/
- Start a web application
- Access http://localhost:8080/testapp/hello.echo2 to watch an example app
^">
Known Issues ^
Groovy objects trying to override final methods from nextapp.echo2.app.ContentPane or nextapp.echo2.app.Component
Due to a bug (see
http://jira.codehaus.org/browse/GROOVY-2326) in groovy system it's not possible to a groovy class to
extend any class that extends nextapp.echo2.app.Component because nextapp.echo2.app.ContentPane defines a
public final Object getProperty(String name) method.
^">
Q&A ^
- Isn't it needed to create a servlet that extends nextapp.echo2.webcontainer.WebContainerServlet?
No. The plugin automatically adds a new org.codehaus.groovy.grails.plugins.echo2.GrailsWebContainerServlet
for each ApplicationInstancfound
^">
Further developments ^
- Echo2Builder: a clone of groovy SwingBuilder for Echo2 components
- Scaffolding
- suggestions accepted
^">
Plugin version history^
- Nov 22nd, 2007
- first version, tested on grails.1.0-rc1