// get this from the parent ResourceTreeNode as resource.parentResource may not be set with
// anything more than the id.
Resource parentResource = resource.getParentResource();
String parentResourceNodeId = ResourceTreeNode.idOf(parentResource);
Tree tree = treeGrid.getTree();
TreeNode parentResourceNode = tree.findById(parentResourceNodeId);
if (null != parentResourceNode) {
parentResource = ((ResourceTreeNode) parentResourceNode).getResource();
resource.setParentResource(parentResource);
}
if (null == parentResource.getName()) {