1

I would like to establish a default internationalization string properties resource for a FXML scene file. The reference tutorial:

Describes how to set an international string and key pair. I would like to have a default file to be used during SceneBuilder sessions and (just in case) there is ever a problem in the field with deployment or the media.

I realise we can't ask for changes to the FXML syntax and it isn't that much trouble to use the set resource (above) every time you open Scene Designer, just for the convenience or designing in a what-you-see-is-what-you-get (wysiwyg) for labels, messages, prompts, etc.

That said, I'd still like to see a mechanism to link to keep a 'sticky' default internationalisation bundle in Scene Designer and at runtime.

What methods can you recommend to load or simulate a default bundle prior to FXML load/processing?

For example; I'd prefer it on my current exercise if the default bundle were loaded per scene. However there will be other cases where a controller or group load for a default bundle is more suitable. Also, is there a JavaFX pre-load hook to pre-process a scene (or FXML file) when loading? Thanks in advance.

see also:

Community
  • 1
  • 1
will
  • 4,799
  • 8
  • 54
  • 90
  • 1
    I'm not sure about a sticky properties reference, but you can do some gruntwork before your scene is shown by using a `Preloader`. I'm afraid i don't know enough about the FXML loading process to inform you of a hook into preloading. However, your controller for your FXML can implement `Initializable`, which defines `initalize(URL, ResourceBundle)` and that will be called during the loading process once the FXML has been processed but has not been returned for use (so before the FXML is available for rendering). – CAG Gonzo Jun 02 '14 at 05:29

0 Answers0