//Find the process in the tree and replace with new
if (mProcessTable.isCellPresent(i, 0) &&
mProcessTable.getText(i, 0).equals(p.getName())) {
setRowStyleBasedOnProcess(i, p);
FastTree t = (FastTree) mProcessTable.getWidget(i, 1);
t.getChild(0).removeItems();
for (final ProcessProperty prop : p.getProperties()) {
if (prop instanceof WorkflowsProperty) {
FastTreeItem workflows =
new FastTreeItem(prop.getName()) {
public void beforeOpen() {
mController.updateProcessProperty(prop);
}
};
t.getChild(0).addItem(workflows);
workflows.becomeInteriorNode();
} else {
Anchor a = new Anchor(prop.getName());
a.addClickHandler(mController.getPropHandler(prop));
t.getChild(0).addItem(a);
}
}
//Found it so we can stop looking
break;
}