The Flex plugin makes it easier to build Grails-powered Rich Internet Applications using Adobe Flex as the front-end client. It depends on the Blaze DS plugin which configures Adobe BlazeDS to provide remoting and messaging as well as the Spring Security Core plugin to secure your application.In development mode you edit MXML and ActionScript files which get compiled into .swf files and support reloading without needing to restart (just like GSPs). When building a war for production deployment your MXML files get precompiled for performance.Plugin version history
0.4 (November 11, 2010)
- Completely rewritten
- Depends on the BlazeDS plugin
- Depends on the Spring Security Core plugin to provide support for Spring Security 3
- Uses Spring Flex version 1.5
0.2 (March 6, 2008)
- Upgraded to BlazeDS release
- Destination name is now configurable (GRAILSPLUGINS-226)
The first step is installing the plugin:
grails install-plugin flex
This will transtitively install the BlazeDS, Spring Security Core, and Spring Security ACL plugins. Refer to the documentation for these plugins for configuration options. At a minimum you'll need to run the s2-quickstart
script to configure Spring Security Core, e.g.grails s2-quickstart com.yourcompany.yourapp User Role
The BlazeDS and Spring Security ACL plugins have no required initialization steps.The next step is configuring the Flex plugin:
You either need to have a FLEX_HOME
environment variable set, or set the grails.plugin.flex.home
property in grails-app/conf/Config.groovy
. This must point at the location of a Flex SDK, e.g.grails.plugin.flex.home = 'c:/devtools/flex'
Once that's configured, run the flex-init script to copy the required development files to your project (in the web-app/WEB-INF/flex
folder):