javafx - Java FX 8 Tablecell data to Listview selected data -
i have java fx tableview column. column pre-populated values database. when click cell on table listview shown, can update table cell , db selecting values list.
before listview shows up, set selected value of list match existing table cell's value following
listview.getselectionmodel().select(this.getitem());
when list view opens selected item corresponds cell value of table.
i have onchangelistener attached listview's selecteditemproperty.
from list view if choose new value, when selection changes db gets updated , table cell gets updated new value.
if there problem database update, listview's selected itemproperty still retains newly selected value.
i have tried resetting using
listview.getselectionmodel().select(this.getitem());
but doesn't reset selecteditemproperty value.
hence if click same cell once again, list having selected value highlighted (i.e value not updated due db failure) table cell , selected value in listview different.
how overcome ?
Comments
Post a Comment