I have a table which is binded data and going to display them using swing UI.
this is the way I bound them.
here CcmConceptData is my data type and i get data through ccmAttributeModel( an instance of CcmAttributeModel class). I call initDataBindings() method inside the same class constructor like this way,
initGui() for display the swing components with table.I can't imagine why even these column names didn't bind to the table !!! When I debug the progrm I see that ccmAttributeModel.loadData() gets the data too.But data is not shown in the table.(not even the column names) Also it doesn't give any error messages.It just show empty frame.
Please some one help me to get out from these issue !!!
When I debug the progrm I see that ccmAttributeModel.loadData() gets the data too.
Where are the debug statements placed?
In the above code initDataBindings() is using ccmAttributeModel.loadData()-and- then ccmAttributeModel() assigned in the constructor CcmAttributeDialog() as this.ccmAttributeModel = ccmAttributeModel;-after-initDataBindings(). What is happening here?
Prasad Saya wrote:In the above code initDataBindings() is using ccmAttributeModel.loadData()-and- then ccmAttributeModel() assigned in the constructor CcmAttributeDialog() as this.ccmAttributeModel = ccmAttributeModel;-after-initDataBindings(). What is happening here?
What is initGui() doing?
Here I passed data to my dialog through CcmAttributeModel .I create instance of CcmAttributeModel as ccmAttributeModel at the starting poin and then changed my constructor like this .
initGui() does is the positioning some of my swing componets and the above table too.
But still it doesn't show my data ???
posted 1 year ago
Ah now the columns are shown in the table.But nonthe data !!!
How did it happen? What is this returning: ccmAttributeModel.loadData()
Also in: final JTableBinding<CcmConceptData, List<CcmConceptData>, JTable> tb = SwingBindings
.createJTableBinding(UpdateStrategy.READ_WRITE, ccmAttributeModel.loadData(), getCcmAttributeTable());
Try changing the UpdateStrategy.READ_WRITE to UpdateStrategy.READ. It looks like the READ_WRITE is not supported as per the API javadocs (though it might be translated to READ).
whether I change UpdateStrategy to UpdateStrategy.READ It shows the same as previous.The table with only the column names.No data.
And ccmAttributeModel.loadData() is return the all the data as a list from my data provider class. it is sure that ccmAttributeModel.loadData() returns the all data as a list here.But the problem I can't see those data in the table