} else
{
documentPath = treeNode.getNodePath()
+ JETSPEED_PATH_SEPRATOR;
}
Link link = getServiceLocator().getPageManager().newLink(
documentPath + document.getName() + ".link");
link.setTitle(document.getTitle());
link.setShortTitle(document.getShortTitle());
link.setUrl(document.getUrl());
link.setTarget(document.getTarget());
link.setHidden(document.isHidden());
linkAction(link, SAVE_ACTION);
node.insert(new DefaultMutableTreeNode(new SiteTreeNode(
link)), 0);
LinkTree tree = (PortalTree) getPage().get("siteTree");
tree.getTreeState().expandNode(node);