Exadel Flamingo RIA framework comes with CRUD application generator. Using the maven-based generator, you can easily generate JavaFX user interfaces connected to Spring or Seam back-ends. In this post I showed how to do it Seam. Let’s do the same with Spring framework. There are just a few simple steps.
- If you don’t have, download and install JavaFX SDK 1.2 for your operating system.
- Set JAVAFX_HOME variable
- Download Exadel Flamingo
- Unzip the downloaded file
- Run flamingoinstall (if you are on Linux, you will need to make the file executable)
- Inside flamingo/bin, run flamingo create project . Just follow the wizard questions, in most cases you can accept the default values. My answers are shown in bold.
max@:~/Exadel/Flamingo/flamingo-1.8.2$ ./bin/flamingo create project [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [com.exadel.flamingo.maven.plugin:flamingoapp:1.8.2:create-project] (aggregator-style) [INFO] ------------------------------------------------------------------------ [WARNING] While downloading jboss:javassist:3.3.ga This artifact has been relocated to javassist:javassist:3.3.GA. [INFO] [flamingoapp:create-project] discovered andromdapp type --> 'flamingo-seam' discovered andromdapp type --> 'flamingo-spring' Please choose the type of application to generate (flamingo-seam, flamingo-spring):[flamingo-spring] flamingo-spring Please enter the location in which your new application will be created (i.e. c:/java/development): [/home/max/Exadel/Flamingo/dev] /home/max/Exadel/Flamingo/dev Enter the project name (e.g. myproject): [javafx-spring] javafx-spring Please enter the root package name for your project (e.g. com.mydomain.myproject): [com.sample] com.sample Will this project have Flex or JavaFX user interface? (flex, javafx): [javafx] javafx What kind of database are you using? (hsql, mysql, oracle, postgres, mssql, db2, sybase, none): [hsql] hsql Enter the JDBC URL for your database (e.g. jdbc:hsqldb:.): [jdbc:hsqldb:.] jdbc:hsqldb:. Enter database username: [sa] sa Enter database password: [] Do you want to update the database schema each time you deploy? (y, n): [y] y Enter the entity class name (Flex source files to view and modify entities will be generated as well): [Person] Person .... ....
- Once generation is completed, go to javafx-spring/web and run this command: ant -f build.xml create-keyEntry
- Go one level up to javafx-spring/web and run: mvn package
- Copy javafx-spring/web/target/javafx-spring.war to Tomcat
8) Start Tomcat - Go to http://localhost:8080/javafx-spring and start the JavaFX applet.
You will see an application shown below:
Login screen:
Main screen (before entering users):
Adding a user:
Main screen with users:
Very useful. Thanks …
Hi, I’m trying to configure spring javafx project with exadel Flamingo following this article but when I run mvn package on javafx-spring/ I get the error:
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Error executing ant tasks
Embedded error: The following error occurred while executing this line:
/home/dmcom/Exadel/Flamingo/dev/javafx-spring/javafx/javafx-build.xml:30: /home/dmcom/Exadel/Flamingo/dev/javafx-spring/javafx/${JAVAFX_HOME} not found.
I’m using Ubuntu 9.04 and I have javafx-sdk1.2 installed on /home/dmcom/javafx-sdk1.2/ as I can see running echo ${JAVAFX_HOME}
Any Ideas of what could be happening?
Thank’s
@dm Did you run flamingoinstall?
Yes, finally I fixed it replacing in file javafx/javafx-build.xml “${JAVAFX_HOME}” with the absolute path of the JavaFx SDK “/home/user/javafx-sdk1.2”.
Thank you.