/* (non-Javadoc)
* @see it.eng.spagobi.analiticalmodel.functionalitytree.presentation.ITreeHtmlGenerator#makeTree(java.util.List, javax.servlet.http.HttpServletRequest, java.lang.String)
*/
public StringBuffer makeTree(List objectsList, HttpServletRequest httpReq, String initialPath) {
httpRequest = httpReq;
IUrlBuilder urlBuilder = UrlBuilderFactory.getUrlBuilder();
StringBuffer htmlStream = new StringBuffer();
htmlStream.append(" <div class='UITabs'>\n");
htmlStream.append(" <div class='first-tab-level' >\n");
Iterator it = objectsList.iterator();
while (it.hasNext()) {
LowFunctionality folder = (LowFunctionality) it.next();
String linkClass = "tab";
if (folder.getPath().equals(initialPath)) linkClass = "tab selected";
htmlStream.append(" <div class='" + linkClass + "'>\n");
Map changeFolderUrlPars = new HashMap();
changeFolderUrlPars.put(ObjectsTreeConstants.PAGE, ExecutionWorkspaceModule.MODULE_PAGE);
changeFolderUrlPars.put(TreeObjectsModule.PATH_SUBTREE, folder.getPath());
if(ChannelUtilities.isWebRunning()) {
changeFolderUrlPars.put(SpagoBIConstants.WEBMODE, "TRUE");
}
String changeFolderUrl = urlBuilder.getUrl(httpRequest, changeFolderUrlPars);
htmlStream.append(" <a href='" + changeFolderUrl + "'>\n");
htmlStream.append(" " + folder.getName() + "\n");
htmlStream.append(" </a>\n");
htmlStream.append(" </div>\n");
}