I am working on an application which is meant to be a study in UI design and the program will include a simple drag and drop JavaFX designer to create forms within the application that will than be saved to a database for later use. My question is is there a precedent for loading JavaFX forms from a database and I am not talking about populating fields from the database but actually loading the entire form layout?
I have been looking for a good tutorial but I haven't found anything that seemed relevant.
SceneBuilder allows you to create form in JavaFX. The SceneBuilder UI definitions are in FXML and CSS - which are just text files. As an FXML and CSS files are just strings, you could store them in a database if you wised.
You may download SceneBuilder from here:
FXML is just a UI definition language so it's scope does not encompass other aspects often found in form fill applications (such as validation).
FXForm2 is a form generator which generates a form layout and validations from Java code with bean annotations, where the form design and layout can be provided as input in an FXML document rather than being auto generated from a bean:
I am somewhat familiar with the scene designers but what i was looking for was an example of how you would pass the fxml file from a database query into the statement for loading a new scene
John Damien Smith
posted 3 years ago
> what i was looking for was an example of how you would pass the fxml file from a database query into the statement for loading a new scene
You will need to write the code yourself from scratch if you want to do that.
Usually FXML is stored as files on a filesystem (just like HTML is) or bundled as a classpath resource inside your application jar.
It is a bit unusual to put it inside something like a relational database management system, though you could certainly do it.
You might want to just place the fxml in files rather than in a database.