Posted by pdizzyd
on May 12, 2008 at 4:32 PM PDT
We are looking at implementing JavaFX as our GUI and have a need to bring in "content" dynamically. Currently we have created a frame and are using a BorderPanel to display one of the content areas. The content needs to change when a button is clicked. We would like to be able to determine which .fx file to display based on the button clicked. Is there a way with the JavaFXScriptingEngine or through the javax.script libraries to simply pass the name of the file, which contains either a BorderPanel def or a method that returns a BorderPanel object to the frame?
We are looking to implement a simple BorderPanel factory.
Ultimately we are looking to separate the UI from mapping actions to views, I guess trying to implement a simple MVC pattern so we can pass these FX scripts to less technical designers on the UI side.
We have review many of the articles posted about using the scripting engines but need a little more guidance.