JFXtras / jfxtras

A supporting library for JavaFX, containing helper classes, extended layouts, controls and other interesting widgets.
http://jfxtras.org
Other
599 stars 123 forks source link

CalendarPicker: cannot set properties in FXML #91

Closed bendardenne closed 6 years ago

bendardenne commented 6 years ago

Hi,

I have the following FXML:

<?import javafx.scene.layout.AnchorPane?>
<?import jfxtras.scene.control.CalendarPicker?>
<AnchorPane xmlns:fx="http://javafx.com/fxml">
  <CalendarPicker locale="de"/>
</AnchorPane>

As in CalendarPickerFXMLTest. But I am getting "Unable to coerce" exceptions.
I am using 8.0-r5.

This is not such a big deal as I can set the locale in code, but still, I assume it should work, shouldn't it?

tbee commented 6 years ago

Yes. Especially since there is a test covering that. Interesting.

bendardenne commented 6 years ago

Okay, my mistake, seems like I need to use a JFXtrasBuilderFactory with FXMLLoader. Closing the issue.

tbee commented 6 years ago

Yes, somewhere the code for adding the builders to the FXMLoader needs to be added. Good that you found that yourself.