问题描述:

I have JTable bound to an ObservableList named 'categories', this is master table. Another (detail) table is bound to master table with the expression 'selectedElement.materialsList', this detail table gets refreshed perfectly when selection is changed on the master table. I try to insert new rows in the detail table as:

int index = masterTable.getSelectedRow();

Categories category = categories.get(index);

Materials material = new Materials();

category.getMaterialsList.add(material);

My problem is that the detail table is not getting refreshed when I add new rows or update existing rows in its corresponing list. However, it works perfectly when I remove rows as:

category.getMaterialsList().remove(x);

Is there something that I am missing? I have also tried calling firePropertyChange as:

firePropertyChange('categories',null,category);

but problem is still there. Please guide me is there is something special that I need to take care of. Thanks in advance.

相关阅读:
Top