Last updated by ichan 2 years ago
Installation
on Linux
- Set environment variables for Grails
linux$ JAVA_HOME=/usr/java/jdk1.6
linux$ GRAILS_HOME=${HOME}/grails-1.1.1
linux$ PATH=${JAVA_HOME}/bin:${GRAILS_HOME}/bin:${PATH}
linux$ export JAVA_HOME GRAILS_HOME PATH
- Create new Grails application
linux$ grails create-app testapp
NOTE: here "testapp" is the Grails application's name.
- Install this plugin into a Grails app
linux$ cd testapp
linux$ grails install-plugin laszlo
- Install OpenLaszlo servlet on GRAILS_HOME
linux$ grails install-laszlo
on Windows
- Set environment variables for Grails
> set JAVA_HOME=c:Program FilesJavajdk1.6
> set GRAILS_HOME=c:grails-1.1.1
> set PATH=%JAVA_HOME%bin;%GRAILS_HOME%bin;%PATH%
- Create a new Grails application
> grails create-app testapp
NOTE: here "testapp" is the Grails application's name.
- Install this plugin into a Grails app
> cd testapp
> grails install-plugin laszlo
- Install OpenLaszlo Servlet on GRAILS_HOME
NOTE: When writing new applications (when you already executed the "grails install-laszlo") you can replace this command with:
Last updated by ichan 2 years ago
OpenLaszlo plugin
Abstract
This plugin installs OpenLaszlo servlet for Grails into GRAILS_HOME directory and scaffolds artifacts of related OpenLaszlo included a Controller and Views.
Current plugin version: 1.0.1
OpenLaszlo servlet version: 4.5.0
cf.
http://www.openlaszlo.orgCommand options list
grails
install-laszlo
- installs OpenLaszlo servlet and jar libraries, which are necessary for laszlo into GRAILS_HOME. Also it downloads openlaszlo servlet war file from OpenLaszlo remote site.
grails
generate-laszlo [domain-class-name]
- generate scaffolding of views and controller related OpenLaszlo
grails
copy-laszlo
- simply copy laszlo libraries into grails_app.
grails
remove-laszlo
- uninstalls OpenLaszlo servlet and jar libraries from GRAILS_HOME and grails app.
Requirements
- Java jdk 1.5 or later
- Grails1.1.1 for laszlo plugin 1.0.1 (Grails1.1 for laszlo plugin 1.0) (Grails 1.0.4 for laszlo plugin 0.6.5) (Grails 1.0.3 for laszlo plugin 0.6.3 and 0.6.4) (Grails 1.0.2 for laszlo plugin 0.6.2) (Grails 1.0.1 for laszlo plugin 0.6.1) (Grails 1.0-RC3 for laszlo plugin 0.5.3)
- Flash Player 8.0 or later
Download site
If you use a command of 'grails install-plugin laszlo', you don't need to download at all.
This command will download a latest release zip file automatically from
http://plugins.grails.org/grails-laszlo.
How to use OpenLaszlo plugin
- Create a Domain class
> grails create-domain-class Cat
Then edit such as follows:
/*** testapp/grails-app/domain/Cat.groovy ***/
class Cat {
String name
Integer age
String sex
}
/********************************************/
- Generate all of artifacts (a controller, views and a lzx)
> grails generate-laszlo Cat
- Start a web application
- Access http://localhost:8080/testapp/cat/ to watch an example app
Also
http://localhost:8080/testapp/plugins/laszlo-1.0.1/charts/ for chart example
Tag library
OpenLaszloTagLib.groovy
| tag | attributes | description | usage |
|---|
| lpsJs | src | defines javascript for laszlo | <g:lpsJs src="embed.js"/><g:lpsJs src="script.js" /> |
| lzEmbed | src,width,height,color | embeds lzx file | <g:lzEmbed src="cat/gridList.lzx" width="800" height="400" color="#d4d0c8"/> |
| pluginJs | src | define javascript for plugin at grails_app_root/plugins/laszlo-1.0.1/web-app/js/ | <g:pluginJs /> |
History
- Aug.12,2009 (version 1.0.1)
- tested on Grails 1.1.1
- upgraded to OpenLaszlo 4.5.0
- Apr.20,2009 (version 1.0)
- tested on Grails version 1.1
- upgraded to OpenLaszlo 4.3.0
- Dec.6,2008 (version 0.6.5)
- tested on Grails version 1.0.4
- Jul.16,2008 (version 0.6.4)
- tested on Grails version 1.0.3
- upgraded to OpenLaszlo 4.1.1
- Jun.29,2008 (version 0.6.3)
- tested on Grails version 1.0.3
- upgraded to Openlaszlo 4.0.12
- Mar.27,2008 (version 0.6.2)
- tested on Grails version 1.0.2
- Mar.11,2008 (version 0.6.1)
- tested on Grails version 1.0.1
- upgraded to OpenLaszlo 4.0.10
- Feb.12,2008 (version 0.6)
- tested on Grails version 1.0
- upgraded to OpenLaszlo 4.0.9
- Dec.21,2007 (version 0.5.3)
- tested on Grails version 1.0-RC3
- Dec.2,2007 (version 0.5.2)
- tested on Grails version 1.0-RC1
- upgraded to OpenLaszlo 4.0.7
- Sep.26,2007 (version 0.5.1)
- upgraded OpenLaszlo from version 4.0.3 to 4.0.5.
- Sep.9,2007 (version 0.5)
- upgraded LZX with Ajax to paginate
- added Gant script to compile LZX to SWF and to make a war file for LZX SOLO app without laszlo libraries
- Sep.3,2007 (version 0.4.4)
- tested on Grails verson 0.6
- Aug.6,2007 (version 0.4.3)
- upgraded OpenLaszlo from version 4.0.2 to 4.0.3.
- Jun.18,2007 (version 0.4.2)
- upgraded OpenLaszlo from version 4.0.0 to 4.0.2.
- tested on Grails version 0.5.6
- May 16,2007 (version 0.4.1)
- changed to use templates for scaffoldings of related OpenLaszlo
- May 8,2007 (version 0.4)
- fixed for Grails version 0.5 upgraded.
- Mar.29,2007 (version 0.3)
- modifyed copyLaszlo.groovy to add java libs for OpenLaszlo 4.0.0 (thanx > Chanwit-san, Mar.30,2007)
- tested on Grails 0.4.2.
- upgraded OpenLaszlo from version 3.3.3 to 4.0.0.
- upgraded to generate Flash swf version over 8.0.
- Feb.12,2007 (version 0.2)
- tested on Grails 0.4.2.
- tested on Grails 0.4.1 and fixed problems on this release.
- changed scaffolded distination directory into grails_app_root/plugins/Laszlo-0.2/grails-app/.
- Feb.6,2007 (version 0.2)
- tested on Grails 0.4 and fixed a problem of scaffolding with "generate-laszlo" option on this stable release.
- Jan.19,2007 (version 0.2)
- added swfobject.js to access from outside flash by Javascript.
- added "grails copy-laszlo" option for only copy laszlo libraries into grails_app without "grails generate-laszlo".
- fixed a bug for deployment to jakarta tomcat.
(Note:When deploying into tomcat, if it requires 'webAppRootKey' context-param in your web.xml files, please add it appropriately)
- added a chart example using FusionCharts.
- Dec.14,2006 (version 0.1)
- install OpenLaszlo Servlet into GRAILS_HOME.
- generate scaffoldings for OpenLaszlo on Grails.
- remove OpenLaszlo libraries from GRAILS_HOME.
Last updated by ichan 2 years ago
Q&A
- Is it possible to use charts to update in realtime on this plugin?
Yes. This plugin includes OpenLaszlo charts components. So you can use them.
These components are located in GRAILS_APP/web-app/lps/components/charts.
For example please visit
http://localhost:8080/GRAILS_APP/lps/components/charts/test/integral/ after running "grails run-app" on your grails application.
Also it's available to use Fusion Chart 2.3 on OpenLaszlo plugin.
Using withFusionChart.zip, it shows like this:

In this example there are two buttons. One is a button to update a chart inside on flash by OpenLaszlo.
Another is outside flash by HTML button, which calls Java script function to update same chart object by SWFObject.js. ref. http://localhost:8080/GRAILS_APP/plugins/laszlo-1.0.1/charts/
requirements:
- Fusion Chart 2.3
- swfobject,js
references:
Last updated by ichan 3 years ago
Screen shot
