lundi 1 avril 2013

FXML + FXForm2 = Developing forms has never been so easy!

We just released a major version of FXForm2 (0.2.0) that includes FXML support.

This new version introduces the brand new FXMLSkin:
  • write your model bean
  • design your form in FXML
  • FXForm2 do the rest!
How does it work? The FXMLSkin lookups all required nodes in the FXML file using their id and bind them automatically to the model bean. This skin offers a new flexible way to create complex forms without the pain of writing all the controllers logic. See wiki to know how to construct node ids.
How do I use it? form.setSkin(new FXMLSkin(form, my_file.fxml));
What about the original skins? Don’t worry, the original Default and Inline skins are still here and will still build the whole form for you! They are still very useful if you don’t need to customize your form too much and allow you to get quickly a functional form.
Feel free to give us feedback about this new feature!
Note: This release implied some architectural refactorings in FXForm2 and the form API has been slightly modified. If you have developed custom skins or custom node factories for a previous FXForm2 version, you will need to migrate them. An article will be published soon to help you do this very easily.