PDA

View Full Version : change value of modeldata and display



fother
6 Aug 2009, 11:31 AM
TreeGrid<ModelData> tree....

new Button("abc", new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(final ButtonEvent ce) {

tree.getSelectionModel().getSelectedItem().set("name", "diego");

}

}));


I need change the name and display.. how I can do this? (my example dont work)

fother
6 Aug 2009, 11:33 AM
final Record rec = tree.getStore().getRecord(tree.getSelectionModel().getSelectedItem());
rec.set("name", "diego");


this work :D