I have a question and tried everywhere in world wide web. So this is my final destination.
I am developing an application (ETRM related) using javafx8 which is actually an application which is already developed using c# with wpf in my company. But the performance is not so good. so i'm trying to do it using javafx so that i can learn few things at the same time i will get some real application development experience.
Problem: (screen shots attached) I open my application and i enter a trade number in a text field and say open. it should open the trade from db. Here Trade is my domain entity which has many properties. for eg: a trade entity have a quantity, buyer and seller etc where buyer and seller are also domain entities. So i open a new trade (first screen shot) and select the properties using the comboboxes and save the trade. this is the flow.
The first block what u see are all properties of the Trade entity**("Trader", "Type", "Contr. Status", Counterparty, etc).** It all loaded with default data. Now when i change any value, for ex. the "Trader" to "ABS" (2nd screen shot) it calls the "trader" property in the "Trade.cs" file (3rd screen shot) and sets the value. it is because the whole block or more precisely the whole tab what u see "Trade#: New1" is bound to the Trade entity at the window creation time itself, so that whenever u change any property on the screen it exactly call the respective getters and setters.
It is done by setting the datacontext of the tab to the trade entity in C#.
I want to achieve the same in javafx. I designed the UI exactly and populated all the data from DB to show in the comboboxes but dont know how to set the datacontext to the UI.
In C# i can bind my domain entity (trade) to a window and whenever i set values on the UI that gets set on the trade entity. datacontext may be the C# term but i want something similar in javafx. Will it be possible to achieve in javafx? Thanks in advance. Please let me know if u need further details. enter image description here