-
17 Feb 2013 2:15 PM #1
TreeGrid: getSelectedItem problem, always unmodified record
TreeGrid: getSelectedItem problem, always unmodified record
Hi All,
I have a problem: after completeEdit event tree.getSelectionModel().getSelectedItem() always returns unmodifed record.
any help?PHP Code:editing.addCompleteEditHandler(new CompleteEditHandler<BaseProxy>(){ @Override public void onCompleteEdit(CompleteEditEvent<BaseProxy> event) { CountryProxy c = (CountryProxy)tree.getSelectionModel().getSelectedItem(); System.out.println(c.getName()); } });
ps: gxt = 3.0.1
-
18 Feb 2013 1:59 PM #2
try this:
store.setAutoCommit(false);
PHP Code:editing.addCompleteEditHandler(new CompleteEditHandler<BaseProxy>(){
@Override public void onCompleteEdit(CompleteEditEvent<BaseProxy> event) { CountryProxy c = (CountryProxy)tree.getSelectionModel().getSelectedItem(); ValueProvider<? super BaseProxy, String> v = cc1.getValueProvider(); String s = tree.getStore().getRecord(c).getValue(v).toString(); System.out.println(c.getName() + " " + s); } });
-
18 Feb 2013 2:44 PM #3
Marking as closed based on discussion in IRC leading to this way of using Store and Record.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote