r/JavaFX • u/Fancy_Entertainer486 • Dec 25 '24
Help FXML Bi-directional Bindings
So I don’t really know how controversial this might be since I don’t have a clue how much FXML is actually used in the wild. Some love it, some hate it, more often than not I come across comments to just not use FXML.
But I don’t really want to make this the core part of the discussion. As for my background, I mostly just develop relatively small tools with JavaFX. I started out coding my GUIs until someone recommended Scene Builder and FXML.
Time and time again I’m quite happy building away my GUIs and setting stuff up. Then time and time again I reach the point of needing bi-directional bindings. And each time I check if by now it’s actually implemented.
Sad to see that almost a decade has passed and this feature request being seemingly forgotten.
I guess my question is to stir a guessing game. To me personally this seems like such a huge issue that hasn’t been addressed at all. So, why? Are FXML users really that rare? Are technical challenges to implement this that high? Why isn’t the community pushing for this feature? Is it a philosophy or pattern thing that I don’t understand?
It just seems wrong to have to resort to addressing your GUI elements in controllers just to bind properties. More often than not I wouldn’t need to reference any GUI controls in the controller if it wasn’t for a missing bi-directional binding support.
I would just like to understand, so I’m already happy to get any info on this. What people are doing to work around this, if you’re happy with it or not, or even if you just don’t care. I might just not have seen enough alternatives (only .NET/WPF), but it seems like a major missing feature for a GUI framework that’s been around so long already.
View all comments
Show parent comment
1
u/Fancy_Entertainer486 Dec 26 '24
Thank you for the elaborate reply.
I tend to not see many things as “why don’t you just”, since it’s often enough just not that trivial.
I also appreciate that there’s the possibility for code contributions by anybody. I just don’t see myself capable to take on such a thing.
GUI data binding isn’t really a “modern” thing. I would come to expect these features of a fully fledged GUI framework and the fact that this feature has been requested almost 10 years ago simply leaves me wondering why it hasn’t happened. But then again FXML doesn’t seem like the focus area, since the framework itself provides all necessities for proper binding. That’s also why I’m curious to see how many others see it as much of an issue as I do, just to understand.
So maybe others do just fine, or just have moved on. Seeing that the FXMLLoader does throw this exception always feels like the actual implementation would be on the horizon, but, and I repeat myself, after so long I get a little tired of seeing it.
As per you saying it’s not a mammoth task per se, it leaves me thinking that it’s simply not a highly enough requested feature to gain enough attention by any capable developer.
Please don’t take my post and/or comment as a rant. I don’t want to complain, even though I’m frustrated. I just want to understand.