JavaFX and Spring CRUD

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.

  1. If you don’t have, download and install JavaFX SDK 1.2 for your operating system.
    1. Set JAVAFX_HOME variable
  2. Download Exadel Flamingo
  3. Unzip the downloaded file
  4. Run flamingoinstall (if you are on Linux, you will need to make the file executable)
  5. 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
      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]
    Please enter the location in which your new application will be created (i.e. c:/java/development):
    Enter the project name (e.g. myproject): [javafx-spring]
    Please enter the root package name for your project (e.g. com.mydomain.myproject): [com.sample]
    Will this project have Flex or JavaFX user interface? (flex, javafx): [javafx]
    What kind of database are you using? (hsql, mysql, oracle, postgres, mssql, db2, sybase, none): [hsql]
    Enter the JDBC URL for your database (e.g. jdbc:hsqldb:.): [jdbc:hsqldb:.]
    Enter database username: [sa]
    Enter database password: []
    Do you want to update the database schema each time you deploy? (y, n): [y]
    Enter the entity class name (Flex source files to view and modify entities will be generated as well): [Person]
  6. Once generation is completed, go to javafx-spring/web and run this command: ant -f build.xml create-keyEntry
  7. Go one level up to javafx-spring/web and run: mvn package
  8. Copy javafx-spring/web/target/javafx-spring.war to Tomcat
    8) Start Tomcat
  9. 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:


  1. Rembrandt Guzmán says:

    Very useful. Thanks …

  2. dm says:

    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:

    [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?


  3. max says:

    @dm Did you run flamingoinstall?

  4. dm says:

    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.

Leave a Comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.