}
if (pRequest.getParameter("treeid") != null) {
String TreeId = pRequest.getParameter("treeid");
PhyloTree aTree = getPhyloTreeService().findByID(Long.parseLong(TreeId));
treeList.add(aTree);
// use "T" to enable the edit menu items.
treeMap.put(getMapKey(aTree), TreeId + separator + aTree.getNewickString() + separator
+ "T");
phylowsMap.put(getMapKey(aTree), aTree.getTreebaseIDString().getNamespacedGUID().toString());
newickStringName = aTree.getTitle();
Study study = aTree.getStudy();
if ( study != null && study.isPublished() ) {
pRequest.getSession().setAttribute("treeBlockID", aTree.getTreeBlock().getId());
pRequest.getSession().setAttribute("studyID", study.getId());
}
defaultNewick = aTree.getNewickString();
}
pRequest.getSession().setAttribute("DEFAULTNEWICK", defaultNewick);
pRequest.getSession().setAttribute("NEWICKSTRINGSMAP", treeMap);
pRequest.getSession().setAttribute("PHYLOWSMAP", phylowsMap);