[jboss-cvs] JBoss Profiler SVN: r487 - in branches/JBossProfiler2: src/etc and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 23 16:59:58 EDT 2008


Author: jesper.pedersen
Date: 2008-10-23 16:59:57 -0400 (Thu, 23 Oct 2008)
New Revision: 487

Added:
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/
   branches/JBossProfiler2/src/main/www/addclasspanel.xhtml
   branches/JBossProfiler2/src/main/www/comparemethods.xhtml
   branches/JBossProfiler2/src/main/www/comparesnapshots.xhtml
   branches/JBossProfiler2/src/main/www/listsnapshot.xhtml
   branches/JBossProfiler2/src/main/www/loadhotspots.xhtml
   branches/JBossProfiler2/src/main/www/loadoverview.xhtml
   branches/JBossProfiler2/src/main/www/loadsnapshot.xhtml
   branches/JBossProfiler2/src/main/www/loadthreadhotspots.xhtml
   branches/JBossProfiler2/src/main/www/loadthreadtree.xhtml
   branches/JBossProfiler2/src/main/www/removeclasspanel.xhtml
Removed:
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/Profiler.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/SnapshotUtility.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/ui/
   branches/JBossProfiler2/src/main/www/addClassPanel.xhtml
   branches/JBossProfiler2/src/main/www/compare_methods.xhtml
   branches/JBossProfiler2/src/main/www/compare_snapshots.xhtml
   branches/JBossProfiler2/src/main/www/listSnapshot.xhtml
   branches/JBossProfiler2/src/main/www/load_hotspots.xhtml
   branches/JBossProfiler2/src/main/www/load_overview.xhtml
   branches/JBossProfiler2/src/main/www/load_snapshot.xhtml
   branches/JBossProfiler2/src/main/www/load_thread_hotspots.xhtml
   branches/JBossProfiler2/src/main/www/load_thread_tree.xhtml
   branches/JBossProfiler2/src/main/www/removeClassPanel.xhtml
Modified:
   branches/JBossProfiler2/build.xml
   branches/JBossProfiler2/src/etc/faces-config.xml
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/BasicOptBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/ClassBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/CompareSnapshotBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/LoadSnapshotBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/MethodBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/OverviewBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/ThreadHotspotBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/TreeFrameBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/TreeThreadBean.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/PostbackPhaseListener.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/TreeDemoStateAdvisor.java
Log:
First part of web review

Modified: branches/JBossProfiler2/build.xml
===================================================================
--- branches/JBossProfiler2/build.xml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/build.xml	2008-10-23 20:59:57 UTC (rev 487)
@@ -237,8 +237,6 @@
              <include name="org/jboss/profiler/client/*"/>
              <include name="org/jboss/profiler/client/web/**"/>
              <include name="org/jboss/profiler/shared/**"/>
-             <include name="org/jboss/profiler/ui/**"/>
-             <include name="org/jboss/profiler/ui/util/**"/>
              <exclude name="**/*.java"/>
           </classes>
           <zipfileset dir="${etc.dir}/"

Modified: branches/JBossProfiler2/src/etc/faces-config.xml
===================================================================
--- branches/JBossProfiler2/src/etc/faces-config.xml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/etc/faces-config.xml	2008-10-23 20:59:57 UTC (rev 487)
@@ -5,107 +5,107 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
     version="1.2">
-	<managed-bean>
-		<managed-bean-name>overviewBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.OverviewBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>classBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.ClassBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>frameInfo</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.shared.FrameInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>methodBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.MethodBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>threadInfoBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.shared.ThreadInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>treeThreadBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.TreeThreadBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>treeFrameBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.TreeFrameBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>threadHotspotBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.ThreadHotspotBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>snapshot</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.shared.Snapshot</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>allocationInfo</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.shared.AllocationInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>threadInfo</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.shared.ThreadInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>classInfo</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.shared.ClassInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>combinedFrameInfo</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.client.CombinedFrameInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>timedClassInfo</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.client.TimedClassInfo</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>selectItem</managed-bean-name>
-		<managed-bean-class>javax.faces.model.SelectItem</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>basicOptBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.BasicOptBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>loadSnapshotBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.LoadSnapshotBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>compareSnapshotBean</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.CompareSnapshotBean</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	<managed-bean>
-		<managed-bean-name>treeDemoStateAdvisor</managed-bean-name>
-		<managed-bean-class>org.jboss.profiler.ui.util.TreeDemoStateAdvisor</managed-bean-class>
-		<managed-bean-scope>session</managed-bean-scope>
-	</managed-bean>
-	
-	<application>
+  
+  <application>
     <locale-config>
       <default-locale>en</default-locale>
     </locale-config>
-	<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
   </application>
-
+  
+  <managed-bean>
+    <managed-bean-name>overviewBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.OverviewBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>classBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.ClassBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>frameInfo</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.shared.FrameInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>methodBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.MethodBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>threadInfoBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.shared.ThreadInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>treeThreadBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.TreeThreadBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>treeFrameBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.TreeFrameBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>threadHotspotBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.ThreadHotspotBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>snapshot</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.shared.Snapshot</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>allocationInfo</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.shared.AllocationInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>threadInfo</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.shared.ThreadInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>classInfo</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.shared.ClassInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>combinedFrameInfo</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.CombinedFrameInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>timedClassInfo</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.TimedClassInfo</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>selectItem</managed-bean-name>
+    <managed-bean-class>javax.faces.model.SelectItem</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>basicOptBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.BasicOptBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>loadSnapshotBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.LoadSnapshotBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>compareSnapshotBean</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.CompareSnapshotBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>treeDemoStateAdvisor</managed-bean-name>
+    <managed-bean-class>org.jboss.profiler.client.web.util.TreeDemoStateAdvisor</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
 </faces-config>

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -85,7 +85,7 @@
    * @param snapshot The snapshot
    * @return The information
    */
-  protected Map<String, List<CombinedFrameInfo>> getInformation(Snapshot snapshot) {
+  public Map<String, List<CombinedFrameInfo>> getInformation(Snapshot snapshot) {
     Map<String, Map<String, CombinedFrameInfo>> data = 
       new HashMap<String, Map<String, CombinedFrameInfo>>();
 
@@ -159,8 +159,8 @@
    * @param info The information
    * @return The timed classes
    */
-  protected List<TimedClassInfo> getTimedClasses(List<ClassInfo> classes,
-                                                 Map<String, List<CombinedFrameInfo>> info) {
+  public List<TimedClassInfo> getTimedClasses(List<ClassInfo> classes,
+                                              Map<String, List<CombinedFrameInfo>> info) {
     List<TimedClassInfo> result = new ArrayList<TimedClassInfo>();
 
     for (ClassInfo ci : classes) {

Copied: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web (from rev 486, branches/JBossProfiler2/src/main/org/jboss/profiler/ui)


Property changes on: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/BasicOptBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/BasicOptBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/BasicOptBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,7 +1,29 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -10,175 +32,204 @@
 import org.jboss.profiler.agent.Agent;
 import org.jboss.profiler.shared.Snapshot;
 import org.jboss.profiler.shared.SnapshotHelper;
-import org.jboss.profiler.ui.util.Profiler;
+
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class BasicOptBean {
-	Profiler profiler1=new Profiler();
-	boolean start=profiler1.isRunning();
-	boolean enabled=Agent.isEnabled();
-	String lastestOpts="";
-	private String addClass;
-	private String visibility;
-	private String removeClass;
-	private String selectSnapshot;
-	private String saveSnapshotName;
-	private boolean panelShows=false;
-	private String saveEcho="";
-	
-	public boolean isStart() {
-		return start;
-	}
-	public void setStart(boolean start) {
-		this.start = start;
-	}
-	public boolean isEnabled() {
-		return enabled;
-	}
-	public void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-	}
-	public String getLastestOpts() {
-		return lastestOpts;
-	}
-	public void setLastestOpts(String lastestOpts) {
-		this.lastestOpts = lastestOpts;
-	}
-	public String getAddClass() {
-		return addClass;
-	}
-	public void setAddClass(String addClass) {
-		this.addClass = addClass;
-	}
-	public String getVisibility() {
-		return visibility;
-	}
-	public void setVisibility(String visibility) {
-		this.visibility = visibility;
-	}
-	public String getRemoveClass() {
-		return removeClass;
-	}
-	public void setRemoveClass(String removeClass) {
-		this.removeClass = removeClass;
-	}
-	public String getSelectSnapshot() {
-		return selectSnapshot;
-	}
-	public void setSelectSnapshot(String selectSnapshot) {
-		this.selectSnapshot = selectSnapshot;
-	}
-	public String getSaveSnapshotName() {
-		return saveSnapshotName;
-	}
-	public void setSaveSnapshotName(String saveSnapshotName) {
-		this.saveSnapshotName = saveSnapshotName;
-	}
-	public boolean isPanelShows() {
-		return panelShows;
-	}
-	public void setPanelShows(boolean panelShows) {
-		this.panelShows = panelShows;
-	}
-	public String getSaveEcho() {
-		return saveEcho;
-	}
-	public void setSaveEcho(String saveEcho) {
-		this.saveEcho = saveEcho;
-	}
-	
-	public void clickStart(){
-		//start or stop, the profiler should be enabled.
-		if(Agent.isEnabled()){
-			if(this.start==false){
-				setStart(true);
-				this.setLastestOpts("Profiler has started.");
-				profiler1.startProfiler();
-			}else{
-				setStart(false);
-				this.setLastestOpts("Profiler has stopped.");
-				profiler1.stopProfiler();
-			}
-		}
-	}
-	public void clickEnable(){
-		if(this.enabled==false && !Agent.isEnabled()){
-				this.setEnabled(true);
-				this.setLastestOpts("Profiler has enabled.");
-				profiler1.enableProfiler();
-		}else if(this.enabled==true && Agent.isEnabled()){
-				this.setEnabled(false);
-				this.setLastestOpts("Profiler has disabled.");
-				profiler1.stopProfiler();
-				profiler1.disableProfiler();
-		}
-	}
-	public void clearSnapshot(){
-		//this.setLastestOpts("clear all snapshots.");
-		profiler1.clearSnapshots();
-		this.setPanelShows(false);
-	}
-	public void gc(){
-		if(Agent.isEnabled()){
-			this.setLastestOpts("begins garbage collection.");
-			org.jboss.profiler.agent.Profiler.garbageCollection();
-		}
-	}
-	
-	public void takeSnapshot(){
-		org.jboss.profiler.agent.Profiler.snapshot();
-		//this.setLastestOpts("take snapshot.");
-		this.setPanelShows(false);
-	}
-	
-	public String[] getSnapshots(){
-		String[] snapshots=org.jboss.profiler.agent.Profiler.listSnapshots();
-		return snapshots;
-	}
-	
-	public void selectSnapshotAction(){
-		this.setPanelShows(true);
-	}
-	
-	public void selectSaveSnapshotAction(){
-		String[] snapshots=this.getSnapshots();
-		int k=0;
-		for(int i=0;i<snapshots.length;i++){
-			if(snapshots[i].equals(this.selectSnapshot))
-				k=i;
-		}
-		Snapshot selectSnapshot1=org.jboss.profiler.agent.Profiler.getSnapshot(k);
-		try {
-			if(this.saveSnapshotName=="")
-				SnapshotHelper.save(selectSnapshot1);
-			else
-				SnapshotHelper.save(selectSnapshot1, new File(this.saveSnapshotName));
-			
-			this.saveEcho="snapshot "+this.saveSnapshotName+" is just saved!";
-			this.saveSnapshotName="";
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-	}
-		
-	public List<SelectItem> getVisibilities(){
-		List<SelectItem> allSelectItems=null;
-		allSelectItems=new ArrayList<SelectItem>(4);
-		allSelectItems.add(new SelectItem("public"));
-		allSelectItems.add(new SelectItem("package"));
-		allSelectItems.add(new SelectItem("protected"));
-		allSelectItems.add(new SelectItem("private"));
-		return allSelectItems;
-	}
-	
-	public void addClassAction(){
-		Profiler profiler=new Profiler();
-		profiler.addClasses(this.addClass, this.visibility);
-	}
-	
-	public void removeClassAction(){
-		Profiler profiler=new Profiler();
-		profiler.removeClasses(this.removeClass);
-	}
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class BasicOptBean implements Serializable {
+  //Profiler profiler1 = new Profiler();
+  private boolean start = false; //profiler1.isRunning();
+  private boolean enabled = false; //Agent.isEnabled();
+  private String lastestOpts = "";
+  private String addClass;
+  private String visibility;
+  private String removeClass;
+  private String selectSnapshot;
+  private String saveSnapshotName;
+  private boolean panelShows = false;
+  private String saveEcho = "";
+  
+  public boolean isStart() {
+    return start;
+  }
+
+  public void setStart(boolean start) {
+    this.start = start;
+  }
+
+  public boolean isEnabled() {
+    return enabled;
+  }
+
+  public void setEnabled(boolean enabled) {
+    this.enabled = enabled;
+  }
+
+  public String getLastestOpts() {
+    return lastestOpts;
+  }
+
+  public void setLastestOpts(String lastestOpts) {
+    this.lastestOpts = lastestOpts;
+  }
+
+  public String getAddClass() {
+    return addClass;
+  }
+
+  public void setAddClass(String addClass) {
+    this.addClass = addClass;
+  }
+
+  public String getVisibility() {
+    return visibility;
+  }
+
+  public void setVisibility(String visibility) {
+    this.visibility = visibility;
+  }
+
+  public String getRemoveClass() {
+    return removeClass;
+  }
+
+  public void setRemoveClass(String removeClass) {
+    this.removeClass = removeClass;
+  }
+
+  public String getSelectSnapshot() {
+    return selectSnapshot;
+  }
+
+  public void setSelectSnapshot(String selectSnapshot) {
+    this.selectSnapshot = selectSnapshot;
+  }
+
+  public String getSaveSnapshotName() {
+    return saveSnapshotName;
+  }
+
+  public void setSaveSnapshotName(String saveSnapshotName) {
+    this.saveSnapshotName = saveSnapshotName;
+  }
+
+  public boolean isPanelShows() {
+    return panelShows;
+  }
+
+  public void setPanelShows(boolean panelShows) {
+    this.panelShows = panelShows;
+  }
+
+  public String getSaveEcho() {
+    return saveEcho;
+  }
+
+  public void setSaveEcho(String saveEcho) {
+    this.saveEcho = saveEcho;
+  }
+  
+  public void clickStart(){
+    // start or stop, the profiler should be enabled.
+    // TODO: cant use Agent / Profiler directly...
+    if (Agent.isEnabled()) {
+      if (this.start == false) {
+        setStart(true);
+        this.setLastestOpts("Profiler has started.");
+        //profiler1.startProfiler();
+      } else {
+        setStart(false);
+        this.setLastestOpts("Profiler has stopped.");
+        //profiler1.stopProfiler();
+      }
+    }
+  }
+
+  public void clickEnable(){
+    // TODO: cant use Agent / Profiler directly...
+    if (this.enabled == false && !Agent.isEnabled()) {
+      this.setEnabled(true); 
+      this.setLastestOpts("Profiler has enabled.");
+      //profiler1.enableProfiler();
+    } else if (this.enabled == true && Agent.isEnabled()) {
+      this.setEnabled(false);
+      this.setLastestOpts("Profiler has disabled.");
+      //profiler1.stopProfiler();
+      //profiler1.disableProfiler();
+    }
+  }
+
+  public void clearSnapshot(){
+    // TODO: cant use Agent / Profiler directly...
+    //this.setLastestOpts("clear all snapshots.");
+    //profiler1.clearSnapshots();
+    this.setPanelShows(false);
+  }
+
+  public void gc(){
+    // TODO: cant use Agent / Profiler directly...
+    if(Agent.isEnabled()){
+      this.setLastestOpts("begins garbage collection.");
+      org.jboss.profiler.agent.Profiler.garbageCollection();
+    }
+  }
+  
+  public void takeSnapshot(){
+    // TODO: cant use Agent / Profiler directly...
+    org.jboss.profiler.agent.Profiler.snapshot();
+    //this.setLastestOpts("take snapshot.");
+    this.setPanelShows(false);
+  }
+  
+  public String[] getSnapshots(){
+    // TODO: cant use Agent / Profiler directly...
+    String[] snapshots = org.jboss.profiler.agent.Profiler.listSnapshots();
+    return snapshots;
+  }
+  
+  public void selectSnapshotAction(){
+    this.setPanelShows(true);
+  }
+  
+  public void selectSaveSnapshotAction(){
+    String[] snapshots = this.getSnapshots();
+    int k=0;
+    for(int i = 0; i < snapshots.length; i++) {
+      if(snapshots[i].equals(this.selectSnapshot))
+        k=i;
+    }
+    Snapshot selectSnapshot1 = org.jboss.profiler.agent.Profiler.getSnapshot(k);
+    try {
+      if (this.saveSnapshotName == "")
+        SnapshotHelper.save(selectSnapshot1);
+      else
+        SnapshotHelper.save(selectSnapshot1, new File(this.saveSnapshotName));
+      
+      this.saveEcho = "snapshot "+this.saveSnapshotName+" is just saved!";
+      this.saveSnapshotName = "";
+    } catch (IOException e) {
+      e.printStackTrace();
+    }
+  }
+  
+  public List<SelectItem> getVisibilities(){
+    List<SelectItem> allSelectItems = new ArrayList<SelectItem>(4);
+    allSelectItems.add(new SelectItem("public"));
+    allSelectItems.add(new SelectItem("package"));
+    allSelectItems.add(new SelectItem("protected"));
+    allSelectItems.add(new SelectItem("private"));
+    return allSelectItems;
+  }
+  
+  public void addClassAction(){
+    // TODO: cant use Agent / Profiler directly...
+    //Profiler profiler = new Profiler();
+    //profiler.addClasses(this.addClass, this.visibility);
+  }
+  
+  public void removeClassAction(){
+    // TODO: cant use Agent / Profiler directly...
+    //Profiler profiler = new Profiler();
+    //profiler.removeClasses(this.removeClass);
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/ClassBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/ClassBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/ClassBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,5 +1,27 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
+import java.io.Serializable;
 import java.text.DecimalFormat;
 import java.util.Collections;
 import java.util.HashSet;
@@ -9,169 +31,176 @@
 
 import org.jboss.profiler.client.CombinedFrameComparator;
 import org.jboss.profiler.client.CombinedFrameInfo;
+import org.jboss.profiler.client.SnapshotUtil;
 import org.jboss.profiler.client.TimedClassComparator;
 import org.jboss.profiler.client.TimedClassInfo;
 import org.jboss.profiler.client.Util;
 import org.jboss.profiler.shared.AllocationInfo;
 import org.jboss.profiler.shared.Math;
 import org.jboss.profiler.shared.Snapshot;
-import org.jboss.profiler.ui.util.SnapshotUtility;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class ClassBean {
-	private String className;
-	private String type;
-	private String totalTime;
-	private String waitTime;
-	long allocCount;
-	private String selectedClass="";
-	
-	private Map<String, List<CombinedFrameInfo>> info=null;
-	private List<TimedClassInfo> classes=null;
-	
-	//the class info in which the methods will be shown.
-	
-	public ClassBean(String className,String type, String totalTime) {
-		super();
-		this.className = className;
-		this.totalTime = totalTime;
-		this.type = type;
-		this.waitTime="";
-		this.allocCount=-1;
-	}
-	
-	public ClassBean(String className,String type, String totalTime,String waitTime, long allocations) {
-		super();
-		this.className = className;
-		this.totalTime = totalTime;
-		this.type = type;
-		this.waitTime=waitTime;
-		this.allocCount=allocations;
-	}
-	
-	public ClassBean() {
-		super();
-		// TODO Auto-generated constructor stub
-	}
-	public String getClassName() {
-		return className;
-	}
-	public void setClassName(String className) {
-		this.className = className;
-	}
-	public String getType() {
-		return type;
-	}
-	public void setType(String type) {
-		this.type = type;
-	}
-	public String getTotalTime() {
-		return totalTime;
-	}
-	public void setTotalTime(String totalTime) {
-		this.totalTime = totalTime;
-	}
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class ClassBean implements Serializable {
+  private String className;
+  private String type;
+  private String totalTime;
+  private String waitTime;
+  long allocCount;
+  private String selectedClass = "";
+  
+  private Map<String, List<CombinedFrameInfo>> info = null;
+  private List<TimedClassInfo> classes = null;
+  
+  //the class info in which the methods will be shown.
+  
+  public ClassBean(String className,String type, String totalTime) {
+    super();
+    this.className = className;
+    this.totalTime = totalTime;
+    this.type = type;
+    this.waitTime = "";
+    this.allocCount = -1;
+  }
+  
+  public ClassBean(String className,String type, String totalTime,String waitTime, long allocations) {
+    super();
+    this.className = className;
+    this.totalTime = totalTime;
+    this.type = type;
+    this.waitTime = waitTime;
+    this.allocCount = allocations;
+  }
+  
+  public ClassBean() {
+    super();
+    // TODO Auto-generated constructor stub
+  }
 
-	public String getWaitTime() {
-		return waitTime;
-	}
-	public void setWaitTime(String waitTime) {
-		this.waitTime = waitTime;
-	}
+  public String getClassName() {
+    return className;
+  }
 
-	public long getAllocCount() {
-		return allocCount;
-	}
-	public void setAllocCount(long allocCount) {
-		this.allocCount = allocCount;
-	}
+  public void setClassName(String className) {
+    this.className = className;
+  }
 
-	private long getAllocations(TimedClassInfo tci, List<AllocationInfo> allocs){
-			String prettyClassName = Util.getPrettyName(tci);
-			long alloc = 0;
-			    
-			if (allocs != null && allocs.size() > 0) {
-	
-			boolean found = false;
-	
-			for (int i = 0; !found && i < allocs.size(); i++) {
-				AllocationInfo ai = allocs.get(i);
-			    if (ai.getClassName().equals(prettyClassName)) {
-			    	alloc = ai.getCount();
-			        found = true;
-			    }
-			 }
-		  }
-		  return alloc;
-	  }
-	
-	public String getSelectedClass() {
-		return selectedClass;
-	}
+  public String getType() {
+    return type;
+  }
 
-	public void setSelectedClass(String selectedClass) {
-		this.selectedClass = selectedClass;
-	}
+  public void setType(String type) {
+    this.type = type;
+  }
 
-	
-	
-	public Set<String> getAjaxRowKeys(){
-		ClassBean[] clazz=this.getClasses();
-		Set<String> keys=new HashSet<String>();
-		for(int i=0;i<clazz.length;i++){
-			keys.add(clazz[i].className);
-		}
-		return keys;
-	}
-	
-	public void fireMethodsInfo(){
-		//Maybe this part needs to integrate with getClasses to keep accord with snapshot.    
-	    TimedClassInfo selectedTimedClassInfo=null,tmpTimedClassInfo=null;
-	    String tmpString;
-	    if(this.classes!=null){
-		    for(int i=0;i<classes.size();i++){
-		    	tmpTimedClassInfo=(TimedClassInfo)(classes.get(i));
-		    	tmpString=tmpTimedClassInfo.getClassName();
-		    	//have to replace / with .
-		    	tmpString=tmpString.replace('/', '.');
-		    	if(this.getSelectedClass().equals(tmpString)) {
-		    		selectedTimedClassInfo=tmpTimedClassInfo;	
-		    		break;
-		    	}
-		    }
-	    }
+  public String getTotalTime() {
+    return totalTime;
+  }
 
-	    MethodBean.setTci(selectedTimedClassInfo);
-	    List<CombinedFrameInfo> l = info.get(selectedTimedClassInfo.getClassName());
-	    MethodBean.setCfs(l);
-	}
-	public ClassBean[] getClasses(){
-		ClassBean[] classBeans=null;
-		
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			DecimalFormat df = new DecimalFormat("#0.00");
-			SnapshotUtility su=new SnapshotUtility();
-		    Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());
-	    
-		    List<TimedClassInfo> classes = su.getTimedClasses(LoadSnapshotBean.getSnapshot().getClasses(), info);
-		    
-		    this.info=info;
-		    this.classes=classes;
-			
-		    Collections.sort(classes, new TimedClassComparator(TimedClassComparator.NAME));
-		    
-		    int j=0;
-		    long tmpCount=0;
-		    classBeans=new ClassBean[classes.size()];
-		    
-		    for (TimedClassInfo tci: classes) {
-		    	tmpCount=this.getAllocations(tci, LoadSnapshotBean.getSnapshot().getAllocations());
-		    	classBeans[j++]=new ClassBean(Util.getPrettyName(tci),Util.getDescription(tci),
-		    			df.format(tci.getTotalTime()), df.format(tci.getWaitTime()),tmpCount);
-		    }	   
-		}
-		return classBeans;
-	}
+  public void setTotalTime(String totalTime) {
+    this.totalTime = totalTime;
+  }
+  
+  public String getWaitTime() {
+    return waitTime;
+  }
+
+  public void setWaitTime(String waitTime) {
+    this.waitTime = waitTime;
+  }
+  
+  public long getAllocCount() {
+    return allocCount;
+  }
+
+  public void setAllocCount(long allocCount) {
+    this.allocCount = allocCount;
+  }
+  
+  private long getAllocations(TimedClassInfo tci, List<AllocationInfo> allocs){
+    String prettyClassName = Util.getPrettyName(tci);
+    long alloc = 0;
+    
+    if (allocs != null && allocs.size() > 0) {
+      
+      boolean found = false;
+      
+      for (int i = 0; !found && i < allocs.size(); i++) {
+        AllocationInfo ai = allocs.get(i);
+        if (ai.getClassName().equals(prettyClassName)) {
+          alloc = ai.getCount();
+          found = true;
+        }
+      }
+    }
+    return alloc;
+  }
+  
+  public String getSelectedClass() {
+    return selectedClass;
+  }
+  
+  public void setSelectedClass(String selectedClass) {
+    this.selectedClass = selectedClass;
+  }
+    
+  public Set<String> getAjaxRowKeys(){
+    ClassBean[] clazz = this.getClasses();
+    Set<String> keys = new HashSet<String>();
+    for(int i = 0; i < clazz.length; i++) {
+      keys.add(clazz[i].className);
+    }
+    return keys;
+  }
+  
+  public void fireMethodsInfo(){
+    //Maybe this part needs to integrate with getClasses to keep accord with snapshot.    
+    TimedClassInfo selectedTimedClassInfo = null, tmpTimedClassInfo = null;
+    String tmpString;
+    if (this.classes != null) {
+      for (int i = 0; i < classes.size(); i++) {
+        tmpTimedClassInfo = (TimedClassInfo)(classes.get(i));
+        tmpString = tmpTimedClassInfo.getClassName();
+        //have to replace / with .
+        tmpString = tmpString.replace('/', '.');
+        if (this.getSelectedClass().equals(tmpString)) {
+          selectedTimedClassInfo=tmpTimedClassInfo;	
+          break;
+        }
+      }
+    }
+    
+    MethodBean.setTci(selectedTimedClassInfo);
+    List<CombinedFrameInfo> l = info.get(selectedTimedClassInfo.getClassName());
+    MethodBean.setCfs(l);
+  }
+
+  public ClassBean[] getClasses(){
+    ClassBean[] classBeans = null;
+    
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      DecimalFormat df = new DecimalFormat("#0.00");
+      SnapshotUtil su = new SnapshotUtil();
+      Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());
+      
+      List<TimedClassInfo> classes = su.getTimedClasses(LoadSnapshotBean.getSnapshot().getClasses(), info);
+      
+      this.info = info;
+      this.classes = classes;
+      
+      Collections.sort(classes, new TimedClassComparator(TimedClassComparator.NAME));
+      
+      int j = 0;
+      long tmpCount = 0;
+      classBeans = new ClassBean[classes.size()];
+      
+      for (TimedClassInfo tci: classes) {
+        tmpCount = this.getAllocations(tci, LoadSnapshotBean.getSnapshot().getAllocations());
+        classBeans[j++] = new ClassBean(Util.getPrettyName(tci),Util.getDescription(tci),
+                                        df.format(tci.getTotalTime()), df.format(tci.getWaitTime()), tmpCount);
+      }	   
+    }
+    return classBeans;
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/CompareSnapshotBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/CompareSnapshotBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/CompareSnapshotBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,7 +1,29 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.Serializable;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -14,225 +36,240 @@
 
 import org.jboss.profiler.client.CombinedFrameComparator;
 import org.jboss.profiler.client.CombinedFrameInfo;
+import org.jboss.profiler.client.SnapshotUtil;
 import org.jboss.profiler.client.TimedClassInfo;
 import org.jboss.profiler.shared.Snapshot;
 import org.jboss.profiler.shared.SnapshotHelper;
-import org.jboss.profiler.ui.util.SnapshotUtility;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class CompareSnapshotBean {
-	private String[] snapshotsToCompare=new String[2];
-	
-	CompareSnapshotBean[] compareSnapshotBeans;
-	
-	private String difftime;
-	
-	private String oTime;
-	
-	private String nTime;
-	
-	private long diffCount;
-	
-	private long oCount;
-	private long nCount;
-	private String methodName;
-	
-	public CompareSnapshotBean(){}
-	
-	public CompareSnapshotBean(String difftime,String oTime,String nTime,long diffCount,long oCount,long nCount, String methodName){
-		this.difftime=difftime;
-		this.oTime=oTime;
-		this.nTime=nTime;
-		this.diffCount=diffCount;
-		this.oCount=oCount;
-		this.nCount=nCount;
-		this.methodName=methodName;
-	}
-	
-	public String getDifftime() {
-		return difftime;
-	}
-	public void setDifftime(String difftime) {
-		this.difftime = difftime;
-	}
-	public String getOTime() {
-		return oTime;
-	}
-	public void setOTime(String time) {
-		oTime = time;
-	}
-	public String getNTime() {
-		return nTime;
-	}
-	public void setNTime(String time) {
-		nTime = time;
-	}
-	public long getDiffCount() {
-		return diffCount;
-	}
-	public void setDiffCount(long diffCount) {
-		this.diffCount = diffCount;
-	}
-	public long getOCount() {
-		return oCount;
-	}
-	public void setOCount(long count) {
-		oCount = count;
-	}
-	public long getNCount() {
-		return nCount;
-	}
-	public void setNCount(long count) {
-		nCount = count;
-	}
-	public String getMethodName() {
-		return methodName;
-	}
-	public void setMethodName(String methodName) {
-		this.methodName = methodName;
-	}
-	public CompareSnapshotBean[] getCompareSnapshotBeans() {
-		return compareSnapshotBeans;
-	}
-	public String[] getSnapshotsToCompare() {
-		return snapshotsToCompare;
-	}
-	public void setSnapshotsToCompare(String[] snapshotsToCompare) {
-		this.snapshotsToCompare = snapshotsToCompare;
-	}
-	
-	public List<SelectItem> getJPSs(){
-		List<SelectItem> allSelectItems=null;
-		File tempFile=new File(".");
-		String[] fileStr=tempFile.list();
-		List<String> jpsFiles=new ArrayList<String>();
-		allSelectItems=new ArrayList<SelectItem>();
-		for(int i=0;i<fileStr.length;i++){
-			if(fileStr[i].endsWith("jps")){
-				jpsFiles.add(fileStr[i]);
-				allSelectItems.add(new SelectItem(fileStr[i]));
-			}
-		}
-		
-		return allSelectItems;
-	}
-	
-	public void analyzeAction() throws Exception{
-		File file1=new File(this.snapshotsToCompare[0]);
-		File file2=new File(this.snapshotsToCompare[1]);
-		
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class CompareSnapshotBean implements Serializable {
+  private String[] snapshotsToCompare=new String[2];
+  
+  CompareSnapshotBean[] compareSnapshotBeans;
+  
+  private String difftime;
+  
+  private String oTime;
+  
+  private String nTime;
+  
+  private long diffCount;
+  
+  private long oCount;
+  private long nCount;
+  private String methodName;
+  
+  public CompareSnapshotBean() {
+  }
+  
+  public CompareSnapshotBean(String difftime,String oTime,String nTime,long diffCount,long oCount,long nCount, String methodName) {
+    this.difftime = difftime;
+    this.oTime = oTime;
+    this.nTime = nTime;
+    this.diffCount = diffCount;
+    this.oCount = oCount;
+    this.nCount = nCount;
+    this.methodName = methodName;
+  }
+  
+  public String getDifftime() {
+    return difftime;
+  }
 
-		try {
-			Snapshot os= SnapshotHelper.load(file1);
+  public void setDifftime(String difftime) {
+    this.difftime = difftime;
+  }
 
-			Snapshot ns = SnapshotHelper.load(file2);
+  public String getOTime() {
+    return oTime;
+  }
 
-			SnapshotUtility su=new SnapshotUtility(); 
-		
-			Map<String, List<CombinedFrameInfo>> oInfo = su.getInformation(os);
+  public void setOTime(String time) {
+    oTime = time;
+  }
 
-			Map<String, List<CombinedFrameInfo>> nInfo = su.getInformation(ns);
-			
-			compareSnapshotBeans= this.compareMethods(oInfo, nInfo);
-			
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-	
-	private CompareSnapshotBean[] compareMethods(Map<String, List<CombinedFrameInfo>> oInfo, Map<String, List<CombinedFrameInfo>> nInfo) throws Exception {
+  public String getNTime() {
+    return nTime;
+  }
 
-		  	List<CombinedFrameInfo> methods = new ArrayList<CombinedFrameInfo>();
-		  	Map<String, CombinedFrameInfo> oMap = new HashMap<String, CombinedFrameInfo>();
-		  	Map<String, CombinedFrameInfo> nMap = new HashMap<String, CombinedFrameInfo>();
+  public void setNTime(String time) {
+    nTime = time;
+  }
 
-		  	Map<String, CombinedFrameInfo> tMap = new HashMap<String, CombinedFrameInfo>();
+  public long getDiffCount() {
+    return diffCount;
+  }
 
-			Iterator it = oInfo.values().iterator();
-			while (it.hasNext()) {
-				List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
-				for (CombinedFrameInfo cfi : l) {
-					oMap.put(cfi.getPrettyName(), cfi);
-					tMap.put(cfi.getPrettyName(), cfi);
-				}
-			}
-			
-			it = nInfo.values().iterator();
-			while (it.hasNext()) {
-				List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
-				for (CombinedFrameInfo cfi : l) {
-						nMap.put(cfi.getPrettyName(), cfi);
-				}
-			}
-				
-			it = nMap.entrySet().iterator();
-			while (it.hasNext()) {
-				Map.Entry entry = (Map.Entry)it.next();
-				String key = (String)entry.getKey();
-				CombinedFrameInfo cfi = (CombinedFrameInfo)entry.getValue();
-				
-				double oTime = 0.0;
-				long oCount = 0;
-				if (oMap.containsKey(key)) {
-					CombinedFrameInfo oCfi = oMap.get(key);
-					oTime = oCfi.getTotalTime();
-					oCount = oCfi.getCount();
-					tMap.remove(key);
-				}
-				
-				CombinedFrameInfo c = new CombinedFrameInfo(cfi.getClassName(), cfi.getPrettyName());
-				c.increaseTotalTime(cfi.getTotalTime() - oTime);
-				c.increaseCount(cfi.getCount() - oCount);
-				
-				methods.add(c);
-			}
-			
-			it = tMap.entrySet().iterator();
-			while (it.hasNext()) {
-				Map.Entry entry = (Map.Entry)it.next();
-				String key = (String)entry.getKey();
-				CombinedFrameInfo cfi = (CombinedFrameInfo)entry.getValue();
-				
-				CombinedFrameInfo c = new CombinedFrameInfo(cfi.getClassName(), cfi.getPrettyName());
-				c.increaseTotalTime(-cfi.getTotalTime());
-				c.increaseCount(-cfi.getCount());
-				
-				methods.add(c);
-			}
+  public void setDiffCount(long diffCount) {
+    this.diffCount = diffCount;
+  }
 
-			Collections.sort(methods, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
-			Collections.reverse(methods);
-		
-			DecimalFormat df = new DecimalFormat("#0.00");
-			
-			this.compareSnapshotBeans=new CompareSnapshotBean[methods.size()];
-			
-			for (int i = 0; i < methods.size(); i++) {
-				CombinedFrameInfo h = methods.get(i);
-				CombinedFrameInfo o = oMap.get(h.getPrettyName());
-				CombinedFrameInfo n = nMap.get(h.getPrettyName());
-				
-				double oTime = 0.0;
-				long oCount = 0;
-				if (o != null) {
-					oTime = o.getTotalTime();
-					oCount = o.getCount();
-				}
-				
-				double nTime = 0.0;
-				long nCount = 0;
-				if (n != null) {
-					nTime = n.getTotalTime();
-					nCount = n.getCount();
-				}
-					
-				compareSnapshotBeans[i]=new CompareSnapshotBean(df.format(h.getTotalTime()),df.format(oTime),
-							df.format(nTime),h.getCount(),oCount,nCount,h.getPrettyName());
-				}
-				
-				return compareSnapshotBeans;
-			}
+  public long getOCount() {
+    return oCount;
+  }
+
+  public void setOCount(long count) {
+    oCount = count;
+  }
+
+  public long getNCount() {
+    return nCount;
+  }
+
+  public void setNCount(long count) {
+    nCount = count;
+  }
+
+  public String getMethodName() {
+    return methodName;
+  }
+
+  public void setMethodName(String methodName) {
+    this.methodName = methodName;
+  }
+
+  public CompareSnapshotBean[] getCompareSnapshotBeans() {
+    return compareSnapshotBeans;
+  }
+
+  public String[] getSnapshotsToCompare() {
+    return snapshotsToCompare;
+  }
+
+  public void setSnapshotsToCompare(String[] snapshotsToCompare) {
+    this.snapshotsToCompare = snapshotsToCompare;
+  }
+  
+  public List<SelectItem> getJPSs(){
+    List<SelectItem> allSelectItems = null;
+    File tempFile = new File(".");
+    String[] fileStr = tempFile.list();
+    List<String> jpsFiles = new ArrayList<String>();
+    allSelectItems = new ArrayList<SelectItem>();
+    for(int i = 0; i < fileStr.length; i++) {
+      if (fileStr[i].endsWith("jps")) {
+        jpsFiles.add(fileStr[i]);
+        allSelectItems.add(new SelectItem(fileStr[i]));
+      }
+    }
+    
+    return allSelectItems;
+  }
+  
+  public void analyzeAction() throws Exception{
+    File file1 = new File(this.snapshotsToCompare[0]);
+    File file2 = new File(this.snapshotsToCompare[1]);
+    
+    try {
+      Snapshot os = SnapshotHelper.load(file1);
+      
+      Snapshot ns = SnapshotHelper.load(file2);
+      
+      SnapshotUtil su = new SnapshotUtil(); 
+      
+      Map<String, List<CombinedFrameInfo>> oInfo = su.getInformation(os);
+      
+      Map<String, List<CombinedFrameInfo>> nInfo = su.getInformation(ns);
+      
+      compareSnapshotBeans = this.compareMethods(oInfo, nInfo);
+      
+    } catch (IOException e) {
+      // TODO Auto-generated catch block
+      e.printStackTrace();
+    }
+  }
+  
+  private CompareSnapshotBean[] compareMethods(Map<String, List<CombinedFrameInfo>> oInfo, Map<String, List<CombinedFrameInfo>> nInfo) throws Exception {
+    List<CombinedFrameInfo> methods = new ArrayList<CombinedFrameInfo>();
+    Map<String, CombinedFrameInfo> oMap = new HashMap<String, CombinedFrameInfo>();
+    Map<String, CombinedFrameInfo> nMap = new HashMap<String, CombinedFrameInfo>();
+    
+    Map<String, CombinedFrameInfo> tMap = new HashMap<String, CombinedFrameInfo>();
+    
+    Iterator it = oInfo.values().iterator();
+    while (it.hasNext()) {
+      List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
+      for (CombinedFrameInfo cfi : l) {
+        oMap.put(cfi.getPrettyName(), cfi);
+        tMap.put(cfi.getPrettyName(), cfi);
+      }
+    }
+    
+    it = nInfo.values().iterator();
+    while (it.hasNext()) {
+      List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
+      for (CombinedFrameInfo cfi : l) {
+        nMap.put(cfi.getPrettyName(), cfi);
+      }
+    }
+    
+    it = nMap.entrySet().iterator();
+    while (it.hasNext()) {
+      Map.Entry entry = (Map.Entry)it.next();
+      String key = (String)entry.getKey();
+      CombinedFrameInfo cfi = (CombinedFrameInfo)entry.getValue();
+      
+      double oTime = 0.0;
+      long oCount = 0;
+      if (oMap.containsKey(key)) {
+        CombinedFrameInfo oCfi = oMap.get(key);
+        oTime = oCfi.getTotalTime();
+        oCount = oCfi.getCount();
+        tMap.remove(key);
+      }
+      
+      CombinedFrameInfo c = new CombinedFrameInfo(cfi.getClassName(), cfi.getPrettyName());
+      c.increaseTotalTime(cfi.getTotalTime() - oTime);
+      c.increaseCount(cfi.getCount() - oCount);
+      
+      methods.add(c);
+    }
+    
+    it = tMap.entrySet().iterator();
+    while (it.hasNext()) {
+      Map.Entry entry = (Map.Entry)it.next();
+      String key = (String)entry.getKey();
+      CombinedFrameInfo cfi = (CombinedFrameInfo)entry.getValue();
+      
+      CombinedFrameInfo c = new CombinedFrameInfo(cfi.getClassName(), cfi.getPrettyName());
+      c.increaseTotalTime(-cfi.getTotalTime());
+      c.increaseCount(-cfi.getCount());
+      
+      methods.add(c);
+    }
+    
+    Collections.sort(methods, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
+    Collections.reverse(methods);
+    
+    DecimalFormat df = new DecimalFormat("#0.00");
+    
+    this.compareSnapshotBeans=new CompareSnapshotBean[methods.size()];
+    
+    for (int i = 0; i < methods.size(); i++) {
+      CombinedFrameInfo h = methods.get(i);
+      CombinedFrameInfo o = oMap.get(h.getPrettyName());
+      CombinedFrameInfo n = nMap.get(h.getPrettyName());
+      
+      double oTime = 0.0;
+      long oCount = 0;
+      if (o != null) {
+        oTime = o.getTotalTime();
+        oCount = o.getCount();
+      }
+      
+      double nTime = 0.0;
+      long nCount = 0;
+      if (n != null) {
+        nTime = n.getTotalTime();
+        nCount = n.getCount();
+      }
+      
+      compareSnapshotBeans[i] = new CompareSnapshotBean(df.format(h.getTotalTime()),df.format(oTime),
+                                                        df.format(nTime),h.getCount(),oCount,nCount,h.getPrettyName());
+    }
+    
+    return compareSnapshotBeans;
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/LoadSnapshotBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/LoadSnapshotBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/LoadSnapshotBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,7 +1,29 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -11,51 +33,52 @@
 import org.jboss.profiler.shared.SnapshotHelper;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class LoadSnapshotBean {
-	private String snapshotToLoad;	
-	private static Snapshot snapshot=null;
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class LoadSnapshotBean implements Serializable {
+  private String snapshotToLoad;	
+  private static Snapshot snapshot = null;
+  
+  public static Snapshot getSnapshot() {
+    return snapshot;
+  }
+  
+  public static void setSnapshot(Snapshot snapshot) {
+    LoadSnapshotBean.snapshot = snapshot;
+  }
+  
+  public String getSnapshotToLoad() {
+    return snapshotToLoad;
+  }
 
-	public static Snapshot getSnapshot() {
-		return snapshot;
-	}
-
-	public static void setSnapshot(Snapshot snapshot) {
-		LoadSnapshotBean.snapshot = snapshot;
-	}
-
-	public String getSnapshotToLoad() {
-		return snapshotToLoad;
-	}
-	public void setSnapshotToLoad(String snapshotToLoad) {
-		this.snapshotToLoad = snapshotToLoad;
-	}
-
-	public List<SelectItem> getJPSs(){
-		List<SelectItem> allSelectItems=null;
-		File tempFile=new File(".");
-		String[] fileStr=tempFile.list();
-		List<String> jpsFiles=new ArrayList<String>();
-		allSelectItems=new ArrayList<SelectItem>();
-		for(int i=0;i<fileStr.length;i++){
-			if(fileStr[i].endsWith("jps")){
-				jpsFiles.add(fileStr[i]);
-				allSelectItems.add(new SelectItem(fileStr[i]));
-			}
-		}	
-		return allSelectItems;
-	}
-	
-	public void analyzeAction(){
-		File file=new File(this.snapshotToLoad);
-		Snapshot snapshot;
-		try {
-			snapshot = SnapshotHelper.load(file);
-			LoadSnapshotBean.setSnapshot(snapshot); 
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
+  public void setSnapshotToLoad(String snapshotToLoad) {
+    this.snapshotToLoad = snapshotToLoad;
+  }
+  
+  public List<SelectItem> getJPSs(){
+    List<SelectItem> allSelectItems = null;
+    File tempFile=new File(".");
+    String[] fileStr = tempFile.list();
+    List<String> jpsFiles = new ArrayList<String>();
+    allSelectItems = new ArrayList<SelectItem>();
+    for(int i = 0; i < fileStr.length; i++){
+      if (fileStr[i].endsWith("jps")) {
+        jpsFiles.add(fileStr[i]);
+        allSelectItems.add(new SelectItem(fileStr[i]));
+      }
+    }
+    return allSelectItems;
+  }
+  
+  public void analyzeAction(){
+    File file = new File(this.snapshotToLoad);
+    Snapshot snapshot;
+    try {
+      snapshot = SnapshotHelper.load(file);
+      LoadSnapshotBean.setSnapshot(snapshot); 
+    } catch (IOException e) {
+      // TODO Auto-generated catch block
+      e.printStackTrace();
+    }
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/MethodBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/MethodBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/MethodBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,5 +1,27 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
+import java.io.Serializable;
 import java.text.DecimalFormat;
 import java.util.Collections;
 import java.util.List;
@@ -10,126 +32,108 @@
 import org.jboss.profiler.shared.Math;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class MethodBean {
-	private long count;
-	private String totalTime;
-	private String cPercent;
-	private String tPercent;
-	private String prettyName;
-	
-	private MethodBean[] methods=null;
-	
-	//the class info in which the methods will be shown.
-	private static TimedClassInfo tci;
-	private static List<CombinedFrameInfo> cfs;
-	
-	public MethodBean(){}
-	
-	public MethodBean(long count, String totalTime, String cPercent,
-			String tPercent, String prettyName) {
-		this.count=count;
-		this.totalTime=totalTime;
-		this.cPercent=cPercent;
-		this.tPercent=tPercent;
-		this.prettyName=prettyName;
-	}
-	
-	public long getCount() {
-		return count;
-	}
-
-	public void setCount(long count) {
-		this.count = count;
-	}
-
-	public String getTotalTime() {
-		return totalTime;
-	}
-
-	public void setTotalTime(String totalTime) {
-		this.totalTime = totalTime;
-	}
-
-	public String getCPercent() {
-		return cPercent;
-	}
-
-	public void setCPercent(String percent) {
-		cPercent = percent;
-	}
-
-	public String getTPercent() {
-		return tPercent;
-	}
-
-	public void setTPercent(String percent) {
-		tPercent = percent;
-	}
-
-	public String getPrettyName() {
-		return prettyName;
-	}
-
-	public void setPrettyName(String prettyName) {
-		this.prettyName = prettyName;
-	}
-	
-	public static TimedClassInfo getTci() {
-		return tci;
-	}
-
-	public static void setTci(TimedClassInfo tci) {
-		MethodBean.tci = tci;
-	}
-
-	public static List<CombinedFrameInfo> getCfs() {
-		return cfs;
-	}
-
-	public static void setCfs(List<CombinedFrameInfo> cfs) {
-		MethodBean.cfs = cfs;
-	}
-
-	public void setMethods(){
-		if (cfs!=null) {
-			DecimalFormat df = new DecimalFormat("#0.00");
-			Collections.sort(cfs, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
-			int j=0;
-			methods=new MethodBean[cfs.size()];
-			
-			for (CombinedFrameInfo cfi : cfs) {		
-				methods[j++]= new MethodBean(cfi.getCount(),
-						df.format(cfi.getTotalTime()),
-						df.format(Math.toPercent(cfi.getTotalTime(), tci.getTotalTime())),
-						df.format(cfi.getPercent()),
-						cfi.getPrettyName());
-			}
-		}
-	}
-
-	public MethodBean[] getMethods(){
-		this.setMethods();
-		return this.methods;
-	}
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class MethodBean implements Serializable {
+  private long count;
+  private String totalTime;
+  private String cPercent;
+  private String tPercent;
+  private String prettyName;
+  
+  private MethodBean[] methods = null;
+  
+  //the class info in which the methods will be shown.
+  private static TimedClassInfo tci;
+  private static List<CombinedFrameInfo> cfs;
+  
+  public MethodBean() {
+  }
+  
+  public MethodBean(long count, String totalTime, String cPercent,
+                    String tPercent, String prettyName) {
+    this.count = count;
+    this.totalTime = totalTime;
+    this.cPercent = cPercent;
+    this.tPercent = tPercent;
+    this.prettyName = prettyName;
+  }
+  
+  public long getCount() {
+    return count;
+  }
+  
+  public void setCount(long count) {
+    this.count = count;
+  }
+  
+  public String getTotalTime() {
+    return totalTime;
+  }
+  
+  public void setTotalTime(String totalTime) {
+    this.totalTime = totalTime;
+  }
+  
+  public String getCPercent() {
+    return cPercent;
+  }
+  
+  public void setCPercent(String percent) {
+    cPercent = percent;
+  }
+  
+  public String getTPercent() {
+    return tPercent;
+  }
+  
+  public void setTPercent(String percent) {
+    tPercent = percent;
+  }
+  
+  public String getPrettyName() {
+    return prettyName;
+  }
+  
+  public void setPrettyName(String prettyName) {
+    this.prettyName = prettyName;
+  }
+  
+  public static TimedClassInfo getTci() {
+    return tci;
+  }
+  
+  public static void setTci(TimedClassInfo tci) {
+    MethodBean.tci = tci;
+  }
+  
+  public static List<CombinedFrameInfo> getCfs() {
+    return cfs;
+  }
+  
+  public static void setCfs(List<CombinedFrameInfo> cfs) {
+    MethodBean.cfs = cfs;
+  }
+  
+  public void setMethods() {
+    if (cfs != null) {
+      DecimalFormat df = new DecimalFormat("#0.00");
+      Collections.sort(cfs, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
+      int j=0;
+      methods = new MethodBean[cfs.size()];
+      
+      for (CombinedFrameInfo cfi : cfs) {		
+        methods[j++]= new MethodBean(cfi.getCount(),
+                                     df.format(cfi.getTotalTime()),
+                                     df.format(Math.toPercent(cfi.getTotalTime(), tci.getTotalTime())),
+                                     df.format(cfi.getPercent()),
+                                     cfi.getPrettyName());
+      }
+    }
+  }
+  
+  public MethodBean[] getMethods(){
+    this.setMethods();
+    return this.methods;
+  }
 }
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/OverviewBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/OverviewBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/OverviewBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,5 +1,27 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -9,140 +31,141 @@
 
 import org.jboss.profiler.client.CombinedFrameComparator;
 import org.jboss.profiler.client.CombinedFrameInfo;
+import org.jboss.profiler.client.SnapshotUtil;
 import org.jboss.profiler.client.TimedClassInfo;
 import org.jboss.profiler.shared.AllocationComparator;
 import org.jboss.profiler.shared.AllocationInfo;
 import org.jboss.profiler.shared.ThreadComparator;
 import org.jboss.profiler.shared.ThreadInfo;
-import org.jboss.profiler.ui.util.SnapshotUtility;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class OverviewBean {
-	private String title;
-	private int packageUnderThreshCount;
+ *@author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class OverviewBean implements Serializable {
+  private String title;
+  private int packageUnderThreshCount;
+  
+  public String getTitle() {
+    return title;
+  }
 
-	public String getTitle() {
-		return title;
-	}
-	public void setTitle(String title) {
-		this.title = title;
-	}
-	public String[] getTitles(){
-		String[] titles={
-			"Threads","Most Time","Hotspots","Allocations","classes"	
-		};
-		return titles;
-	}
+  public void setTitle(String title) {
+    this.title = title;
+  }
 
-	public int getPackageUnderThreshCount() {
-		return packageUnderThreshCount;
-	}
-	public void setPackageUnderThreshCount(int packageUnderThreshCount) {
-		this.packageUnderThreshCount = packageUnderThreshCount;
-	}
-	public List<AllocationInfo> getAllocations() {
-		List<AllocationInfo> allocationList=null;
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			Collections.sort(LoadSnapshotBean.getSnapshot().getAllocations(), new AllocationComparator());
-			allocationList=LoadSnapshotBean.getSnapshot().getAllocations();
-		}
+  public String[] getTitles(){
+    String[] titles={
+      "Threads","Most Time","Hotspots","Allocations","classes"	
+    };
+    return titles;
+  }
+  
+  public int getPackageUnderThreshCount() {
+    return packageUnderThreshCount;
+  }
 
-		return allocationList;
-	}
+  public void setPackageUnderThreshCount(int packageUnderThreshCount) {
+    this.packageUnderThreshCount = packageUnderThreshCount;
+  }
 
-	public List<CombinedFrameInfo> getHotspots(){
-		
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			SnapshotUtility su=new SnapshotUtility();
-		    Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());	  
-		    List<CombinedFrameInfo> hotspotsInfo = new ArrayList<CombinedFrameInfo>();
-		    Iterator it = info.values().iterator();
-		    while (it.hasNext()) {
-		      List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
-		      hotspotsInfo.addAll(l);
-		    }
-		    Collections.sort(hotspotsInfo,new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME_AVG));
-		    
-		    return hotspotsInfo;
-		}	
-		else return null;
-	}
-	
-	public List<CombinedFrameInfo> getMostTime(){
-		  SnapshotUtility su=new SnapshotUtility();
-		  
-		  if(LoadSnapshotBean.getSnapshot()!=null)
-		  {
-			  Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());
-			  List<TimedClassInfo> classes = su.getTimedClasses(LoadSnapshotBean.getSnapshot().getClasses(), info);
-	      
-			  List<CombinedFrameInfo> allMethods = new ArrayList<CombinedFrameInfo>();
-
-			  Iterator it = info.values().iterator();
-			  while (it.hasNext()) {
-				  List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
-				  allMethods.addAll(l);
-			  }
-
-			  Collections.sort(allMethods, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
-			  return allMethods;
-		  }
-		  else return null;		  
-	}
-	
-	public List<ThreadInfo> getThreads(){		
-		List<ThreadInfo> threads=null;
-		if(LoadSnapshotBean.getSnapshot()!=null){
-		    Collections.sort(LoadSnapshotBean.getSnapshot().getThreads(), new ThreadComparator());
-		    threads=LoadSnapshotBean.getSnapshot().getThreads();
-		    return threads;
-		}
-		else return null;
-	}
-	
-	public List<CombinedFrameInfo> getPackages(){	
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			SnapshotUtility su=new SnapshotUtility();
-		    Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());
-		    List<TimedClassInfo> classes = su.getTimedClasses(LoadSnapshotBean.getSnapshot().getClasses(), info);
-		    
-		    Map<String, CombinedFrameInfo> packages = new HashMap<String, CombinedFrameInfo>();
-
-		    Iterator it = info.entrySet().iterator();
-		    while (it.hasNext()) {
-		      Map.Entry entry = (Map.Entry)it.next();
-		      String key = (String)entry.getKey();
-		      List<CombinedFrameInfo> value = (List<CombinedFrameInfo>)entry.getValue();
-
-		      for (CombinedFrameInfo cfi : value) {
-		        String cn = cfi.getClassName();
-		        cn = cn.replace('/', '.');
-		        if (cn.lastIndexOf(".") != -1) {
-		          cn = cn.substring(0, cn.lastIndexOf("."));
-		        }
-
-		        CombinedFrameInfo ci = packages.get(cn);
-		        if (ci == null) {
-		          ci = new CombinedFrameInfo(cn, cn);
-		        }
-		        ci.increaseTotalTime(cfi.getTotalTime());
-		        ci.increasePercent(cfi.getPercent());
-		        packages.put(cn, ci);
-		      }
-		    }
-
-		    List<CombinedFrameInfo> result = new ArrayList<CombinedFrameInfo>(packages.values());
-		    Collections.sort(result, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
-
-		    int count = 0;
-		    
-		    int j=0;
-		   
-		    this.packageUnderThreshCount=count;
-		    return result;
-		}
-		else return null;
-		}
+  public List<AllocationInfo> getAllocations() {
+    List<AllocationInfo> allocationList = null;
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      Collections.sort(LoadSnapshotBean.getSnapshot().getAllocations(), new AllocationComparator());
+      allocationList = LoadSnapshotBean.getSnapshot().getAllocations();
+    }
+    
+    return allocationList;
+  }
+  
+  public List<CombinedFrameInfo> getHotspots() {
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      SnapshotUtil su = new SnapshotUtil();
+      Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());	  
+      List<CombinedFrameInfo> hotspotsInfo = new ArrayList<CombinedFrameInfo>();
+      Iterator it = info.values().iterator();
+      while (it.hasNext()) {
+        List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
+        hotspotsInfo.addAll(l);
+      }
+      Collections.sort(hotspotsInfo,new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME_AVG));
+      
+      return hotspotsInfo;
+    }	
+    return null;
+  }
+  
+  public List<CombinedFrameInfo> getMostTime(){
+    SnapshotUtil su = new SnapshotUtil();
+    
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());
+      List<TimedClassInfo> classes = su.getTimedClasses(LoadSnapshotBean.getSnapshot().getClasses(), info);
+      
+      List<CombinedFrameInfo> allMethods = new ArrayList<CombinedFrameInfo>();
+      
+      Iterator it = info.values().iterator();
+      while (it.hasNext()) {
+        List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
+        allMethods.addAll(l);
+      }
+      
+      Collections.sort(allMethods, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
+      return allMethods;
+    }
+    return null;		  
+  }
+  
+  public List<ThreadInfo> getThreads(){		
+    List<ThreadInfo> threads = null;
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      Collections.sort(LoadSnapshotBean.getSnapshot().getThreads(), new ThreadComparator());
+      threads = LoadSnapshotBean.getSnapshot().getThreads();
+    }
+    return threads;
+  }
+  
+  public List<CombinedFrameInfo> getPackages(){	
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      SnapshotUtil su = new SnapshotUtil();
+      Map<String, List<CombinedFrameInfo>> info = su.getInformation(LoadSnapshotBean.getSnapshot());
+      List<TimedClassInfo> classes = su.getTimedClasses(LoadSnapshotBean.getSnapshot().getClasses(), info);
+      
+      Map<String, CombinedFrameInfo> packages = new HashMap<String, CombinedFrameInfo>();
+      
+      Iterator it = info.entrySet().iterator();
+      while (it.hasNext()) {
+        Map.Entry entry = (Map.Entry)it.next();
+        String key = (String)entry.getKey();
+        List<CombinedFrameInfo> value = (List<CombinedFrameInfo>)entry.getValue();
+        
+        for (CombinedFrameInfo cfi : value) {
+          String cn = cfi.getClassName();
+          cn = cn.replace('/', '.');
+          if (cn.lastIndexOf(".") != -1) {
+            cn = cn.substring(0, cn.lastIndexOf("."));
+          }
+          
+          CombinedFrameInfo ci = packages.get(cn);
+          if (ci == null) {
+            ci = new CombinedFrameInfo(cn, cn);
+          }
+          ci.increaseTotalTime(cfi.getTotalTime());
+          ci.increasePercent(cfi.getPercent());
+          packages.put(cn, ci);
+        }
+      }
+      
+      List<CombinedFrameInfo> result = new ArrayList<CombinedFrameInfo>(packages.values());
+      Collections.sort(result, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
+      
+      int count = 0;
+      
+      int j=0;
+      
+      this.packageUnderThreshCount = count;
+      return result;
+    }
+    return null;
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/ThreadHotspotBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/ThreadHotspotBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/ThreadHotspotBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,5 +1,27 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
+import java.io.Serializable;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -21,201 +43,205 @@
 import org.jboss.profiler.shared.ThreadInfo;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class ThreadHotspotBean {
-	private String selectItem=null;
-	private ThreadInfo selectThreadInfo=null;
-	
-	private ArrayList<String> mainKeys;
-	private ArrayList<String> subKeys;
-	private ArrayList<CombinedFrameInfo> subValues;
-	private HashMap<String,CombinedFrameInfo> newMap;
+ *@author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class ThreadHotspotBean implements Serializable {
+  private String selectItem = null;
+  private ThreadInfo selectThreadInfo = null;
+  
+  private ArrayList<String> mainKeys;
+  private ArrayList<String> subKeys;
+  private ArrayList<CombinedFrameInfo> subValues;
+  private HashMap<String,CombinedFrameInfo> newMap;
+  
+  public ThreadHotspotBean() {
+  }
+  
+  public String getSelectItem() {
+    return selectItem;
+  }
 
-	public ThreadHotspotBean() {
-	}
-	
-	public String getSelectItem() {
-		return selectItem;
-	}
-	public void setSelectItem(String selectItem) {
-		this.selectItem = selectItem;
-	}
-	
-	public ThreadInfo getSelectThreadInfo() {
-		return selectThreadInfo;
-	}
-	public void setSelectThreadInfo(ThreadInfo selectThreadInfo) {
-		this.selectThreadInfo = selectThreadInfo;
-		this.selectItem=selectThreadInfo.getName();
-	}
-	
-	public ArrayList<String> getMainKeys() {
-		return mainKeys;
-	}
+  public void setSelectItem(String selectItem) {
+    this.selectItem = selectItem;
+  }
+  
+  public ThreadInfo getSelectThreadInfo() {
+    return selectThreadInfo;
+  }
 
-	public void setMainKeys(ArrayList<String> mainKeys) {
-		this.mainKeys = mainKeys;
-	}
+  public void setSelectThreadInfo(ThreadInfo selectThreadInfo) {
+    this.selectThreadInfo = selectThreadInfo;
+    this.selectItem = selectThreadInfo.getName();
+  }
+  
+  public ArrayList<String> getMainKeys() {
+    return mainKeys;
+  }
+  
+  public void setMainKeys(ArrayList<String> mainKeys) {
+    this.mainKeys = mainKeys;
+  }
+  
+  public ArrayList<String> getSubKeys() {
+    return subKeys;
+  }
 
-	public ArrayList<String> getSubKeys() {
-		return subKeys;
-	}
-	public void setSubKeys(ArrayList<String> subKeys) {
-		this.subKeys = subKeys;
-	}
+  public void setSubKeys(ArrayList<String> subKeys) {
+    this.subKeys = subKeys;
+  }
+  
+  public ArrayList<CombinedFrameInfo> getSubValues() {
+    return subValues;
+  }
 
-	public ArrayList<CombinedFrameInfo> getSubValues() {
-		return subValues;
-	}
-	public void setSubValues(ArrayList<CombinedFrameInfo> subValues) {
-		this.subValues = subValues;
-	}
-
-	public HashMap<String, CombinedFrameInfo> getNewMap() {
-		return newMap;
-	}
-
-	public void setNewMap(HashMap<String, CombinedFrameInfo> newMap) {
-		this.newMap = newMap;
-	}
-
-	public List<ThreadInfo> getAllThreads(){
-		List<ThreadInfo> threadsList=null;
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			threadsList=LoadSnapshotBean.getSnapshot().getThreads();
-		}
-
-		return threadsList;
-	}
-
-	public void selectionChanged(javax.faces.event.ValueChangeEvent evt){
-		this.setSelectItem(((String)evt.getNewValue()));
-		
-		//get the selected thread
-		List<ThreadInfo> allThreads=this.getAllThreads();
-		Iterator<ThreadInfo> it=allThreads.iterator();
-		ThreadInfo tmpThreadInfo=null;
-		while(it.hasNext()){
-			tmpThreadInfo=it.next();
-			if(tmpThreadInfo.getName().endsWith(this.selectItem))
-				break;
-		}
-		generateArrayFromMap(tmpThreadInfo);
-	}
-	
-	public List<SelectItem> getAllSelectItems(){
-		List<SelectItem> allSelectItems=null;
-		List<ThreadInfo> threadsList=null;
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			threadsList=LoadSnapshotBean.getSnapshot().getThreads();
-			allSelectItems=new ArrayList<SelectItem>(threadsList.size());
-			for(int i=0;i<threadsList.size();i++){
-				allSelectItems.add(new SelectItem(threadsList.get(i).getName()));
-			}
-		}
-		return allSelectItems;
-	}
-	
-	public void showMapInfo(ThreadInfo threadInfo){
-		Map<String, Map<String, CombinedFrameInfo>> data = new HashMap<String, Map<String, CombinedFrameInfo>>();
-		   
-		//only one thread information, not all threadList
-		for (FrameInfo fi: threadInfo.getFrames()) {
-			getCallerInformation(fi, data);
-		}
-		
-		Iterator dit = data.entrySet().iterator();
-		DecimalFormat df = new DecimalFormat("#0.00");
-		
-		while (dit.hasNext()) {
-		      Map.Entry entry = (Map.Entry)dit.next();
-		      String key = (String)entry.getKey();
-		      Map<String, CombinedFrameInfo> value = (Map<String, CombinedFrameInfo>)entry.getValue();
-
-		      Map<String, List<CombinedFrameInfo>> m = new HashMap<String, List<CombinedFrameInfo>>();
-		      Iterator vit = value.values().iterator();
-		      while (vit.hasNext()) {
-		        CombinedFrameInfo cfi = (CombinedFrameInfo)vit.next();
-
-		        List<CombinedFrameInfo> l = m.get(cfi.getClassName());
-		        if (l == null) {
-		          l = new ArrayList<CombinedFrameInfo>();
-		          m.put(cfi.getClassName(), l);
-		        }
-		        l.add(cfi);
-		      }
-
-		      Iterator mit = m.entrySet().iterator();
-		      while (mit.hasNext()) {
-		        Map.Entry mentry = (Map.Entry)mit.next();
-		        String methodName = (String)mentry.getKey();
-		        List<CombinedFrameInfo> callers = (List<CombinedFrameInfo>)mentry.getValue();
-		        Collections.sort(callers, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
-		      }// show List information.
-		}//show map information
-	}
-	
-	public void generateArrayFromMap(ThreadInfo threadInfo){
-		Map<String, Map<String, CombinedFrameInfo>> map = new HashMap<String, Map<String, CombinedFrameInfo>>();
-		   
-		for (FrameInfo fi: threadInfo.getFrames()) {
-			getCallerInformation(fi, map);
-		}
-		
-		HashMap<String,CombinedFrameInfo> newMap=new HashMap();
-		Set<String> set=map.keySet();
-		ArrayList<String> mainKeys=new ArrayList(set);
-		this.mainKeys=mainKeys;
-		
-		ArrayList subKeys=new ArrayList();
-		ArrayList subValues=new ArrayList();
-		
-		Iterator it = map.values().iterator();
-		while(it.hasNext()){
-			Map<String, CombinedFrameInfo> subMap=(Map<String, CombinedFrameInfo>) it.next();
-			Set entrySet=subMap.entrySet();
-			Iterator entryIt=entrySet.iterator();
-			while(entryIt.hasNext()){
-				Map.Entry<String, CombinedFrameInfo> entry=(Entry<String, CombinedFrameInfo>) entryIt.next();
-				subKeys.add(entry.getKey());
-				subValues.add(entry.getValue());
-				newMap.put(entry.getKey(), entry.getValue());
-			}
-		}
-		
-		this.setSubKeys(subKeys);
-		this.setSubValues(subValues);
-		this.setNewMap(newMap);
-	}
-	
-	  /**
-	   * Get caller information
-	   * @param fi The frame
-	   * @param data The data
-	   */
-	  public void getCallerInformation(FrameInfo fi, Map<String, Map<String, CombinedFrameInfo>> data) {
-	    Map<String, CombinedFrameInfo> entry = data.get(fi.getMethod().getClassName());
-	    if (entry == null) {
-	      entry = new HashMap<String, CombinedFrameInfo>();
-	      data.put(fi.getMethod().getClassName(), entry);
-	    }
-	    if (fi.getParent() != null) {
-	      String parentName = Util.getPrettyName(fi.getParent().getMethod());
-	      CombinedFrameInfo cfi = entry.get(parentName);
-	      if (cfi == null) {
-	        cfi = new CombinedFrameInfo(Util.getPrettyName(fi.getMethod()), parentName);
-	        entry.put(parentName, cfi);
-	      }
-
-	      cfi.increaseCount(fi.getParent().getCount());
-	      cfi.increaseTotalTime(Math.nanoToMilli(fi.getParent().getNetTime()));
-	    }
-
-	    if (fi.getChildren() != null && fi.getChildren().size() > 0) {
-	      for (FrameInfo child : fi.getChildren()) {
-	        getCallerInformation(child, data);
-	      }
-	    }
-	  }
+  public void setSubValues(ArrayList<CombinedFrameInfo> subValues) {
+    this.subValues = subValues;
+  }
+  
+  public HashMap<String, CombinedFrameInfo> getNewMap() {
+    return newMap;
+  }
+  
+  public void setNewMap(HashMap<String, CombinedFrameInfo> newMap) {
+    this.newMap = newMap;
+  }
+  
+  public List<ThreadInfo> getAllThreads(){
+    List<ThreadInfo> threadsList = null;
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      threadsList = LoadSnapshotBean.getSnapshot().getThreads();
+    }
+    
+    return threadsList;
+  }
+  
+  public void selectionChanged(javax.faces.event.ValueChangeEvent evt){
+    this.setSelectItem(((String)evt.getNewValue()));
+    
+    //get the selected thread
+    List<ThreadInfo> allThreads = this.getAllThreads();
+    Iterator<ThreadInfo> it = allThreads.iterator();
+    ThreadInfo tmpThreadInfo = null;
+    while (it.hasNext()) {
+      tmpThreadInfo = it.next();
+      if (tmpThreadInfo.getName().endsWith(this.selectItem))
+        break;
+    }
+    generateArrayFromMap(tmpThreadInfo);
+  }
+  
+  public List<SelectItem> getAllSelectItems() {
+    List<SelectItem> allSelectItems = null;
+    List<ThreadInfo> threadsList = null;
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      threadsList = LoadSnapshotBean.getSnapshot().getThreads();
+      allSelectItems = new ArrayList<SelectItem>(threadsList.size());
+      for (int i = 0; i<threadsList.size(); i++) {
+        allSelectItems.add(new SelectItem(threadsList.get(i).getName()));
+      }
+    }
+    return allSelectItems;
+  }
+  
+  public void showMapInfo(ThreadInfo threadInfo){
+    Map<String, Map<String, CombinedFrameInfo>> data = new HashMap<String, Map<String, CombinedFrameInfo>>();
+    
+    //only one thread information, not all threadList
+    for (FrameInfo fi: threadInfo.getFrames()) {
+      getCallerInformation(fi, data);
+    }
+    
+    Iterator dit = data.entrySet().iterator();
+    DecimalFormat df = new DecimalFormat("#0.00");
+    
+    while (dit.hasNext()) {
+      Map.Entry entry = (Map.Entry)dit.next();
+      String key = (String)entry.getKey();
+      Map<String, CombinedFrameInfo> value = (Map<String, CombinedFrameInfo>)entry.getValue();
+      
+      Map<String, List<CombinedFrameInfo>> m = new HashMap<String, List<CombinedFrameInfo>>();
+      Iterator vit = value.values().iterator();
+      while (vit.hasNext()) {
+        CombinedFrameInfo cfi = (CombinedFrameInfo)vit.next();
+        
+        List<CombinedFrameInfo> l = m.get(cfi.getClassName());
+        if (l == null) {
+          l = new ArrayList<CombinedFrameInfo>();
+          m.put(cfi.getClassName(), l);
+        }
+        l.add(cfi);
+      }
+      
+      Iterator mit = m.entrySet().iterator();
+      while (mit.hasNext()) {
+        Map.Entry mentry = (Map.Entry)mit.next();
+        String methodName = (String)mentry.getKey();
+        List<CombinedFrameInfo> callers = (List<CombinedFrameInfo>)mentry.getValue();
+        Collections.sort(callers, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME));
+      }// show List information.
+    }//show map information
+  }
+  
+  public void generateArrayFromMap(ThreadInfo threadInfo){
+    Map<String, Map<String, CombinedFrameInfo>> map = new HashMap<String, Map<String, CombinedFrameInfo>>();
+    
+    for (FrameInfo fi: threadInfo.getFrames()) {
+      getCallerInformation(fi, map);
+    }
+    
+    HashMap<String,CombinedFrameInfo> newMap=new HashMap();
+    Set<String> set=map.keySet();
+    ArrayList<String> mainKeys=new ArrayList(set);
+    this.mainKeys=mainKeys;
+    
+    ArrayList subKeys=new ArrayList();
+    ArrayList subValues=new ArrayList();
+    
+    Iterator it = map.values().iterator();
+    while(it.hasNext()){
+      Map<String, CombinedFrameInfo> subMap=(Map<String, CombinedFrameInfo>) it.next();
+      Set entrySet=subMap.entrySet();
+      Iterator entryIt=entrySet.iterator();
+      while(entryIt.hasNext()){
+        Map.Entry<String, CombinedFrameInfo> entry=(Entry<String, CombinedFrameInfo>) entryIt.next();
+        subKeys.add(entry.getKey());
+        subValues.add(entry.getValue());
+        newMap.put(entry.getKey(), entry.getValue());
+      }
+    }
+    
+    this.setSubKeys(subKeys);
+    this.setSubValues(subValues);
+    this.setNewMap(newMap);
+  }
+  
+  /**
+   * Get caller information
+   * @param fi The frame
+   * @param data The data
+   */
+  public void getCallerInformation(FrameInfo fi, Map<String, Map<String, CombinedFrameInfo>> data) {
+    Map<String, CombinedFrameInfo> entry = data.get(fi.getMethod().getClassName());
+    if (entry == null) {
+      entry = new HashMap<String, CombinedFrameInfo>();
+      data.put(fi.getMethod().getClassName(), entry);
+    }
+    if (fi.getParent() != null) {
+      String parentName = Util.getPrettyName(fi.getParent().getMethod());
+      CombinedFrameInfo cfi = entry.get(parentName);
+      if (cfi == null) {
+        cfi = new CombinedFrameInfo(Util.getPrettyName(fi.getMethod()), parentName);
+        entry.put(parentName, cfi);
+      }
+      
+      cfi.increaseCount(fi.getParent().getCount());
+      cfi.increaseTotalTime(Math.nanoToMilli(fi.getParent().getNetTime()));
+    }
+    
+    if (fi.getChildren() != null && fi.getChildren().size() > 0) {
+      for (FrameInfo child : fi.getChildren()) {
+        getCallerInformation(child, data);
+      }
+    }
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/TreeFrameBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/TreeFrameBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/TreeFrameBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,32 +1,55 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 import org.jboss.profiler.shared.FrameInfo;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class TreeFrameBean {
+ *@author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class TreeFrameBean implements Serializable {
 
-	private static List<FrameInfo> enterFrames=null;
-	private List<FrameInfo> srcRoots=null;
+  private static List<FrameInfo> enterFrames = null;
+  private List<FrameInfo> srcRoots = null;
+  
+  public static List<FrameInfo> getEnterFrames() {
+    return enterFrames;
+  }
+  
+  public static void setEnterFrames(List<FrameInfo> enterFrames) {
+    TreeFrameBean.enterFrames = enterFrames;
+  }
+  
+  public synchronized List<FrameInfo> getSrcRoots() {
+    if (enterFrames == null)
+      return null;
 
-	public static List<FrameInfo> getEnterFrames() {
-		return enterFrames;
-	}
-
-	public static void setEnterFrames(List<FrameInfo> enterFrames) {
-		TreeFrameBean.enterFrames = enterFrames;
-	}
-
-	public synchronized List<FrameInfo> getSrcRoots() {
-		
-		if(enterFrames==null) return null;
-			srcRoots=new ArrayList<FrameInfo>(enterFrames.size());
-			for(int i=0;i<enterFrames.size();i++){
-				srcRoots.add(enterFrames.get(i));
-			}
-			return srcRoots;
-	}
+    srcRoots = new ArrayList<FrameInfo>(enterFrames.size());
+    for (int i = 0; i < enterFrames.size(); i++) {
+      srcRoots.add(enterFrames.get(i));
+    }
+    return srcRoots;
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/TreeThreadBean.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/TreeThreadBean.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/TreeThreadBean.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,8 +1,30 @@
-package org.jboss.profiler.ui;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web;
 
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
+import java.io.Serializable;
 import java.io.Writer;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
@@ -20,38 +42,41 @@
 import org.richfaces.model.TreeNodeImpl;
 
 /**
- at author Huijuan Shao <hjshao at hitachi.cn>
-*/
-public class TreeThreadBean {
-	//the id of selectedThread
-	private long selectedThread;
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class TreeThreadBean implements Serializable {
+  //the id of selectedThread
+  private long selectedThread;
+  
+  public TreeThreadBean() {
+  }
+  
+  public long getSelectedThread() {
+    return selectedThread;
+  }
 
-	public TreeThreadBean() {
-	}
+  public void setSelectedThread(long selectedThread) {
+    this.selectedThread = selectedThread;
+  }
 
-	public long getSelectedThread() {
-		return selectedThread;
-	}
-	public void setSelectedThread(long selectedThread) {
-		this.selectedThread = selectedThread;
-	}
-	public List<ThreadInfo> getAllThreads(){
-		List<ThreadInfo> threadsList=null;
-		if(LoadSnapshotBean.getSnapshot()!=null){
-			threadsList=LoadSnapshotBean.getSnapshot().getThreads();
-		}
-		return threadsList;
-	}
-	
-	public void fireSelectedThread(){
-		List<ThreadInfo> allthreads=this.getAllThreads();
-		ThreadInfo tmpThreadInfo=null;
-		for(int i=0;i<allthreads.size();i++){
-			tmpThreadInfo=allthreads.get(i);
-			if(tmpThreadInfo.getId()==this.getSelectedThread()) break;
-		}
-		
-		List<FrameInfo> frames=tmpThreadInfo.getFrames();
-		TreeFrameBean.setEnterFrames(tmpThreadInfo.getFrames());
-	}
+  public List<ThreadInfo> getAllThreads(){
+    List<ThreadInfo> threadsList = null;
+    if (LoadSnapshotBean.getSnapshot() != null) {
+      threadsList=LoadSnapshotBean.getSnapshot().getThreads();
+    }
+    return threadsList;
+  }
+  
+  public void fireSelectedThread(){
+    List<ThreadInfo> allthreads = this.getAllThreads();
+    ThreadInfo tmpThreadInfo=null;
+    for(int i = 0; i < allthreads.size(); i++) {
+      tmpThreadInfo = allthreads.get(i);
+      if (tmpThreadInfo.getId() == this.getSelectedThread())
+        break;
+    }
+    
+    List<FrameInfo> frames = tmpThreadInfo.getFrames();
+    TreeFrameBean.setEnterFrames(tmpThreadInfo.getFrames());
+  }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/PostbackPhaseListener.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/util/PostbackPhaseListener.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/PostbackPhaseListener.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,5 +1,27 @@
-package org.jboss.profiler.ui.util;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web.util;
 
+import java.io.Serializable;
 import java.util.Map;
 
 import javax.faces.context.ExternalContext;
@@ -8,34 +30,35 @@
 import javax.faces.event.PhaseId;
 import javax.faces.event.PhaseListener;
 
-public class PostbackPhaseListener implements PhaseListener {
+/**
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class PostbackPhaseListener implements PhaseListener, Serializable {
 
-	private static final long serialVersionUID = 1L;
-	public static final String POSTBACK_ATTRIBUTE_NAME = PostbackPhaseListener.class.getName();
-	
-	public void afterPhase(PhaseEvent event) {
-	}
-
-	public void beforePhase(PhaseEvent event) {
-		FacesContext facesContext = event.getFacesContext();
-		Map requestMap = facesContext.getExternalContext().getRequestMap();
-		requestMap.put(POSTBACK_ATTRIBUTE_NAME, Boolean.TRUE);
-	}
-
-	public PhaseId getPhaseId() {
-		return PhaseId.APPLY_REQUEST_VALUES;
-	}
-
-	public static boolean isPostback() {
-		FacesContext facesContext = FacesContext.getCurrentInstance();
-		if (facesContext != null) {
-			ExternalContext externalContext = facesContext.getExternalContext();
-			if (externalContext != null) {
-				return Boolean.TRUE.equals(
-						externalContext.getRequestMap().get(POSTBACK_ATTRIBUTE_NAME));
-			}
-		}
-		return false;
-	}
-	
+  private static final long serialVersionUID = 1L;
+  public static final String POSTBACK_ATTRIBUTE_NAME = PostbackPhaseListener.class.getName();
+  
+  public void afterPhase(PhaseEvent event) {
+  }
+  
+  public void beforePhase(PhaseEvent event) {
+    FacesContext facesContext = event.getFacesContext();
+    Map requestMap = facesContext.getExternalContext().getRequestMap();
+    requestMap.put(POSTBACK_ATTRIBUTE_NAME, Boolean.TRUE);
+  }
+  
+  public PhaseId getPhaseId() {
+    return PhaseId.APPLY_REQUEST_VALUES;
+  }
+  
+  public static boolean isPostback() {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
+    if (facesContext != null) {
+      ExternalContext externalContext = facesContext.getExternalContext();
+      if (externalContext != null) {
+        return Boolean.TRUE.equals(externalContext.getRequestMap().get(POSTBACK_ATTRIBUTE_NAME));
+      }
+    }
+    return false;
+  }
 }

Deleted: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/Profiler.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/util/Profiler.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/Profiler.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,195 +0,0 @@
-package org.jboss.profiler.ui.util;
-
-import org.jboss.profiler.agent.Agent;
-import org.jboss.profiler.connectors.LocalHandler;
-import org.jboss.profiler.shared.Command;
-import org.jboss.profiler.shared.CommandType;
-import org.jboss.profiler.shared.Visibility;
-
-import org.jboss.logging.Logger;
-
-/**
- * The profiler mbean class
- * @author Jesper Pedersen <jesper.pedersen at jboss.org>
- */
-public class Profiler{
-  /** The logger */
-  private static Logger log = Logger.getLogger(Profiler.class);
-
-  /**
-   * Constructor
-   */
-  public Profiler() {
-  }
-
-  /**
-   * Is the profiler enabled ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isEnabled() {
-    return Agent.isEnabled();
-  }
-
-  /**
-   * Is the profiler running ?
-   * @return True if running; otherwise false
-   */
-  public boolean isRunning() {
-    return org.jboss.profiler.agent.Profiler.isRunning();
-  }
-
-  /**
-   * Is the profiler using a memory store ?
-   * @return True if memory store; otherwise false
-   */
-  public boolean isMemory() {
-    return Agent.isMemoryStore();
-  }
-
-  /**
-   * Is the profiler using a file store ?
-   * @return True if file store; otherwise false
-   */
-  public boolean isFile() {
-    return !Agent.isMemoryStore();
-  }
-
-  /**
-   * Is EJB ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isEJB() {
-    return Agent.isEJB();
-  }
-
-  /**
-   * Is Servlet ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isServlet() {
-    return Agent.isServlet();
-  }
-
-  /**
-   * Is JSF ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isJSF() {
-    return Agent.isJSF();
-  }
-
-  /**
-   * Is JMX ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isJMX() {
-    return Agent.isJMX();
-  }
-
-  /**
-   * Is RMI ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isRMI() {
-    return Agent.isRMI();
-  }
-
-  /**
-   * Is CORBA ?
-   * @return True if enabled; otherwise false
-   */
-  public boolean isCORBA() {
-    return Agent.isCORBA();
-  }
-
-  /**
-   * Start the profiler
-   */
-  public void startProfiler() {
-    LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.START_PROFILER));
-  }
-
-  /**
-   * Stop the profiler
-   */
-  public void stopProfiler() {
-    LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.STOP_PROFILER));
-  }
-
-  /**
-   * Enable the profiler
-   */
-  public void enableProfiler() {
-    LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.ENABLE));
-  }
-
-  /**
-   * Disable the profiler
-   */
-  public void disableProfiler() {
-    LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.DISABLE));
-  }
-
-  /**
-   * Add classes
-   * @param classes The classes
-   * @param v The visibility
-   */
-  public void addClasses(String classes, String v) {
-    LocalHandler lh = new LocalHandler();
-
-    if (v == null || v.trim().equals("")) {
-      v = "public";
-    }
-
-    Visibility vi = null;
-    if (v.equalsIgnoreCase("private")) {
-      vi = Visibility.PRIVATE;
-    } else if (v.equalsIgnoreCase("protected")) {
-      vi = Visibility.PROTECTED;
-    } else if (v.equalsIgnoreCase("package")) {
-      vi = Visibility.PACKAGE;
-    } else {
-      vi = Visibility.PUBLIC;
-    }
-
-    lh.handleCommand(new Command(CommandType.ADD_CLASSES, new Object[] { classes, vi }));
-  }
-
-  /**
-   * Remove classes
-   * @param classes The classes
-   */
-  public void removeClasses(String classes) {
-    LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.REMOVE_CLASSES, new Object[] { classes }));
-  }
-
-  /**
-   * Clear snapshots
-   */
-  public void clearSnapshots() {
-    LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.CLEAR_SNAPSHOTS));
-  }
-
-  /**
-   * Start the service
-   * @exception Exception Thrown if an exception occurs
-   */
-  public void start() throws Exception {
-    log.info("JBoss Profiler: ProfilerMBean started");
-  }
-
-  /**
-   * Stop the service
-   * @exception Exception Thrown if an exception occurs
-   */
-  public void stop() throws Exception {
-    log.info("JBoss Profiler: ProfilerMBean stopped");
-  }
-}

Deleted: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/SnapshotUtility.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/util/SnapshotUtility.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/SnapshotUtility.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,259 +0,0 @@
-package org.jboss.profiler.ui.util;
-
-import org.jboss.profiler.client.CombinedFrameComparator;
-import org.jboss.profiler.client.CombinedFrameInfo;
-import org.jboss.profiler.client.TimedClassComparator;
-import org.jboss.profiler.client.TimedClassInfo;
-import org.jboss.profiler.shared.AllocationComparator;
-import org.jboss.profiler.shared.AllocationInfo;
-import org.jboss.profiler.shared.ClassComparator;
-import org.jboss.profiler.shared.ClassInfo;
-import org.jboss.profiler.shared.FrameComparator;
-import org.jboss.profiler.shared.FrameInfo;
-import org.jboss.profiler.shared.Math;
-import org.jboss.profiler.shared.Snapshot;
-import org.jboss.profiler.shared.SnapshotHelper;
-import org.jboss.profiler.shared.ThreadComparator;
-import org.jboss.profiler.shared.ThreadInfo;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.Writer;
-import java.text.DecimalFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.List;
-import java.util.Map;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.jboss.logging.Logger;
-import org.jboss.profiler.client.Util;
-
-/**
- * The snapshot utility class
- * @author Jesper Pedersen <jesper.pedersen at jboss.org>
- */
-public class SnapshotUtility {
-  /** The logger */
-  private static Logger log = Logger.getLogger(SnapshotUtility.class);
-
-  /** New line character */
-  protected static final String NEW_LINE = System.getProperty("line.separator");
-
-  /** Threshold */
-  protected double threshold;
-
-  /**
-   * Constructor
-   */
-  public SnapshotUtility() {
-    this(1.0);
-  }
-
-  /**
-   * Constructor
-   * @param threshold The threshold
-   */
-  public SnapshotUtility(double threshold) {
-    this.threshold = threshold;
-  }
-
-  /**
-   * Get information about the snapshot
-   * @param snapshot The snapshot
-   * @return The information
-   */
-  //changed by shj 20080814 from protected-> public
-  public Map<String, List<CombinedFrameInfo>> getInformation(Snapshot snapshot) {
-    Map<String, Map<String, CombinedFrameInfo>> data = 
-      new HashMap<String, Map<String, CombinedFrameInfo>>();
-
-    long tt = 0;
-    for (ThreadInfo ti: snapshot.getThreads()) {
-      tt += ti.getTotalTime();
-    }
-
-    for (ThreadInfo ti: snapshot.getThreads()) {
-      for (FrameInfo fi: ti.getFrames()) {
-        frameInformation(fi, tt, data);
-      }
-    }
-
-    Map<String, List<CombinedFrameInfo>> result = new HashMap<String, List<CombinedFrameInfo>>();
-
-    Iterator it = data.entrySet().iterator();
-    while (it.hasNext()) {
-      Map.Entry entry = (Map.Entry)it.next();
-      String key = (String)entry.getKey();
-      Map<String, CombinedFrameInfo> value = (Map<String, CombinedFrameInfo>)entry.getValue();
-      
-      result.put(key, new ArrayList<CombinedFrameInfo>(value.values()));
-    }
-
-    return result;
-  }
-
-  /**
-   * Generate frame information
-   * @param fi The frame
-   * @param tt The total time (ns)
-   * @param data The data
-   */
-  public void frameInformation(FrameInfo fi, long tt, Map<String, Map<String, CombinedFrameInfo>> data) {
-    Map<String, CombinedFrameInfo> classData = data.get(fi.getMethod().getClassName());
-      
-    if (classData == null) {
-      classData = new HashMap<String, CombinedFrameInfo>();
-      data.put(fi.getMethod().getClassName(), classData);
-    }
-
-    String prettyName = Util.getPrettyName(fi.getMethod());
-    CombinedFrameInfo methodData = classData.get(prettyName);
-    
-    if (methodData == null) {
-      methodData = new CombinedFrameInfo(fi.getMethod().getClassName(), prettyName);
-      classData.put(prettyName, methodData);
-    }
-    
-    long net = fi.getNetTime();
-    double percent = Math.toPercent(net, (double)tt);
-    double time = Math.nanoToMilli(net);
-    
-    methodData.increaseCount(fi.getCount());
-    methodData.increaseTotalTime(time);
-    methodData.increasePercent(percent);
-    methodData.increaseWaitTime(Math.nanoToMilli(fi.getWaitTime()));
-
-    List<FrameInfo> l = fi.getChildren();
-    if (l != null) {
-      for (FrameInfo child: l) {
-        frameInformation(child, tt, data);
-      }
-    }
-  }
-
-  /**
-   * Get the timed classes
-   * @param classes The classes
-   * @param info The information
-   * @return The timed classes
-   */
-  public List<TimedClassInfo> getTimedClasses(List<ClassInfo> classes,
-                                                 Map<String, List<CombinedFrameInfo>> info) {
-    List<TimedClassInfo> result = new ArrayList<TimedClassInfo>();
-
-    for (ClassInfo ci : classes) {
-      List<CombinedFrameInfo> l = info.get(ci.getClassName());
-
-      double time = 0.0;
-      double wait = 0.0;
-      
-      if (l != null) {
-        for (CombinedFrameInfo cfi: l) {
-          time += cfi.getTotalTime();
-          wait += cfi.getWaitTime();
-        }
-      }
-
-      TimedClassInfo tci = new TimedClassInfo(ci, time, wait);
-      result.add(tci);
-    }
-
-    return result;
-  }
-
-  /**
-   * Dump the hotspots
-   * @param info The information
-   * @param directory The directory
-   * @exception Exception If an error occurs
-   */
-  public Vector getHotspots(Map<String, List<CombinedFrameInfo>> info) throws Exception {
-	Vector<Object> vector_total=new Vector();
-	  
-    List<CombinedFrameInfo> hotspots = new ArrayList<CombinedFrameInfo>();
-    Iterator it = info.values().iterator();
-    while (it.hasNext()) {
-      List<CombinedFrameInfo> l = (List<CombinedFrameInfo>)it.next();
-      hotspots.addAll(l);
-    }
-
-    Collections.sort(hotspots, new CombinedFrameComparator(CombinedFrameComparator.TOTAL_TIME_AVG));
-    DecimalFormat df = new DecimalFormat("#0.00");
-
-    int count = 0;
-    
-    int countArray[]=new int[1000];
-    double totalTimeArray[]=new double[1000];
-    double avgArray[]=new double[1000];
-    double percentArray[]=new double[1000];
-    String nameArray[]=new String[1000];
-    
-    int j=0;
-    for (int i = 0; i < hotspots.size(); i++) {
-      CombinedFrameInfo h = hotspots.get(i);
-
-      double avg = h.getTotalTime() / h.getCount();
-
-      if (avg >= threshold) {
-    	countArray[j]=(int) h.getCount();
-    	totalTimeArray[j]=h.getTotalTime();
-    	avgArray[j]=avg;
-    	percentArray[j]=h.getPercent();
-    	nameArray[j]= h.getPrettyName();
-    	j++;
-      } else {
-        count++;
-      }
-    }
-    
-    vector_total.add(countArray);
-    vector_total.add(totalTimeArray);
-    vector_total.add(avgArray);
-    vector_total.add(percentArray);
-    vector_total.add(nameArray);
-    vector_total.add(count);
-    return vector_total;
-  }
-  
-  public Vector getHotspots(Snapshot snapshot) throws Exception{
-	  Map<String, List<CombinedFrameInfo>> info = this.getInformation(snapshot);
-	  return getHotspots(info);
-  }
-
-  /**
-   * Get caller information
-   * @param fi The frame
-   * @param data The data
-   */
-  protected void getCallerInformation(FrameInfo fi, Map<String, Map<String, CombinedFrameInfo>> data) {
-    Map<String, CombinedFrameInfo> entry = data.get(fi.getMethod().getClassName());
-    if (entry == null) {
-      entry = new HashMap<String, CombinedFrameInfo>();
-      data.put(fi.getMethod().getClassName(), entry);
-    }
-    if (fi.getParent() != null) {
-      String parentName = Util.getPrettyName(fi.getParent().getMethod());
-      CombinedFrameInfo cfi = entry.get(parentName);
-      if (cfi == null) {
-        cfi = new CombinedFrameInfo(Util.getPrettyName(fi.getMethod()), parentName);
-        entry.put(parentName, cfi);
-      }
-
-      cfi.increaseCount(fi.getParent().getCount());
-      cfi.increaseTotalTime(Math.nanoToMilli(fi.getParent().getNetTime()));
-    }
-
-    if (fi.getChildren() != null && fi.getChildren().size() > 0) {
-      for (FrameInfo child : fi.getChildren()) {
-        getCallerInformation(child, data);
-      }
-    }
-  }
-}

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/TreeDemoStateAdvisor.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ui/util/TreeDemoStateAdvisor.java	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/TreeDemoStateAdvisor.java	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,24 +1,49 @@
-package org.jboss.profiler.ui.util;
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007-2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.profiler.client.web.util;
 
+import java.io.Serializable;
+
 import org.richfaces.component.UITree;
 import org.richfaces.component.state.TreeStateAdvisor;
 import org.richfaces.model.TreeRowKey;
 
-public class TreeDemoStateAdvisor implements TreeStateAdvisor {
+/**
+ * @author Huijuan Shao <hjshao at hitachi.cn>
+ */
+public class TreeDemoStateAdvisor implements TreeStateAdvisor, Serializable {
 
-	public Boolean adviseNodeOpened(UITree tree) {
-		if (!PostbackPhaseListener.isPostback()) {
-			Object key = tree.getRowKey();
-			TreeRowKey treeRowKey = (TreeRowKey) key;
-			if (treeRowKey == null || treeRowKey.depth() <= 2) {
-				return Boolean.TRUE;
-			}
-		}
-		return null;
-	}
+  public Boolean adviseNodeOpened(UITree tree) {
+    if (!PostbackPhaseListener.isPostback()) {
+      Object key = tree.getRowKey();
+      TreeRowKey treeRowKey = (TreeRowKey) key;
+      if (treeRowKey == null || treeRowKey.depth() <= 2) {
+        return Boolean.TRUE;
+      }
+    }
+    return null;
+  }
 
-	public Boolean adviseNodeSelected(UITree tree) {
-		return null;
-	}
-
-}
\ No newline at end of file
+  public Boolean adviseNodeSelected(UITree tree) {
+    return null;
+  }
+}

Deleted: branches/JBossProfiler2/src/main/www/addClassPanel.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/addClassPanel.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/addClassPanel.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,61 +0,0 @@
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:rich="http://richfaces.org/rich"
-            xmlns:a4j="http://richfaces.org/a4j"
-      xmlns:ui="http://java.sun.com/jsf/facelets">
-	
-    <rich:modalPanel id="addClassPanel" width="350" height="250" onhide="false">
-    <a4j:region id="addClassRegion">
-	    <a4j:form id="addClassFrom" ajaxSubmit="true" rendered="true"> 
-	    <a4j:outputPanel layout="block">
-	    
-  		<f:facet name="controls">
-        		<h:panelGroup>
-                	<h:graphicImage value="/images/modal/close.png" style="cursor:pointer" id="hidelink1"/>
-                	<rich:componentControl for="addClassPanel" attachTo="hidelink1" operation="hide" event="onclick"/>
-            	</h:panelGroup>
-        		</f:facet>
-				<h:panelGroup>
-				<rich:panel>
-				<f:facet name="header">
-                	<h:outputText value="Add Class to Intercept During Runtime"/>
-        		</f:facet>
-        		
-        		<h:outputText value="Class to add (e.g. org.jboss.*)"/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>
-        		
-				<h:inputText value="#{basicOptBean.addClass}"/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>
-				
-				<h:outputText value="Choose the visibility for above class"/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>
-				
-				<a4j:outputPanel layout="block" id="visibilitySelect">
-				<h:selectOneMenu value="#{basicOptBean.visibility}" style="width: 200px" lable="#{basicOptBean.visibility}">
-					<a4j:support event="onchange" reRender="port,protocolSelect">
-    				</a4j:support>
-    				<f:selectItems value="#{basicOptBean.visibilities}" />
-				</h:selectOneMenu>
-				</a4j:outputPanel>
-
-				<br/>
-
-				<a4j:commandButton id="addButton1" value="add class" action="#{basicOptBean.addClassAction}" onclick="this.disable=true">
-					<rich:componentControl for="addClassPanel" attachTo="addButton1" operation="hide" event="onclick"/>
-				</a4j:commandButton>
-			
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<a4j:commandButton id="closebutton1" value="cancel">
-				<rich:componentControl for="addClassPanel" attachTo="closebutton1" operation="hide" event="onclick"/>
-				</a4j:commandButton>
-				</rich:panel>
-        		</h:panelGroup>
-    </a4j:outputPanel>
-    </a4j:form>
-	</a4j:region>
-    </rich:modalPanel>
-	</ui:composition>
\ No newline at end of file

Copied: branches/JBossProfiler2/src/main/www/addclasspanel.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/addClassPanel.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/addclasspanel.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/addclasspanel.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,61 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:rich="http://richfaces.org/rich"
+            xmlns:a4j="http://richfaces.org/a4j"
+      xmlns:ui="http://java.sun.com/jsf/facelets">
+	
+    <rich:modalPanel id="addClassPanel" width="350" height="250" onhide="false">
+    <a4j:region id="addClassRegion">
+	    <a4j:form id="addClassFrom" ajaxSubmit="true" rendered="true"> 
+	    <a4j:outputPanel layout="block">
+	    
+  		<f:facet name="controls">
+        		<h:panelGroup>
+                	<h:graphicImage value="/images/modal/close.png" style="cursor:pointer" id="hidelink1"/>
+                	<rich:componentControl for="addClassPanel" attachTo="hidelink1" operation="hide" event="onclick"/>
+            	</h:panelGroup>
+        		</f:facet>
+				<h:panelGroup>
+				<rich:panel>
+				<f:facet name="header">
+                	<h:outputText value="Add Class to Intercept During Runtime"/>
+        		</f:facet>
+        		
+        		<h:outputText value="Class to add (e.g. org.jboss.*)"/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>
+        		
+				<h:inputText value="#{basicOptBean.addClass}"/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>
+				
+				<h:outputText value="Choose the visibility for above class"/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>
+				
+				<a4j:outputPanel layout="block" id="visibilitySelect">
+				<h:selectOneMenu value="#{basicOptBean.visibility}" style="width: 200px" lable="#{basicOptBean.visibility}">
+					<a4j:support event="onchange" reRender="port,protocolSelect">
+    				</a4j:support>
+    				<f:selectItems value="#{basicOptBean.visibilities}" />
+				</h:selectOneMenu>
+				</a4j:outputPanel>
+
+				<br/>
+
+				<a4j:commandButton id="addButton1" value="add class" action="#{basicOptBean.addClassAction}" onclick="this.disable=true">
+					<rich:componentControl for="addClassPanel" attachTo="addButton1" operation="hide" event="onclick"/>
+				</a4j:commandButton>
+			
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<a4j:commandButton id="closebutton1" value="cancel">
+				<rich:componentControl for="addClassPanel" attachTo="closebutton1" operation="hide" event="onclick"/>
+				</a4j:commandButton>
+				</rich:panel>
+        		</h:panelGroup>
+    </a4j:outputPanel>
+    </a4j:form>
+	</a4j:region>
+    </rich:modalPanel>
+	</ui:composition>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/addclasspanel.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Deleted: branches/JBossProfiler2/src/main/www/compare_methods.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/compare_methods.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/compare_methods.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,77 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="http://richfaces.org/a4j"
-	xmlns:rich="http://richfaces.org/rich">
-
-	<ui:composition template="/template/comparetemplate.xhtml">
-		<ui:define name="compareContent">
-		<h:form>
-			<h:outputText value="The methods #{compareSnapshotBean.snapshotsToCompare[0]} and #{compareSnapshotBean.snapshotsToCompare[1]} comparing results is: "/>
-			<p></p>
-			
-			<rich:datascroller align="left" for="compareSnapshotsTable" maxPages="20"/>
-				<rich:spacer height="30"/>
-            
-    			<rich:dataTable id="compareSnapshotsTable" rows="10" value="#{compareSnapshotBean.compareSnapshotBeans}" var="compareResult" width="500px" columnClasses="center" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
-    			<f:facet name="label"> 
-                        <h:outputText value="Diff(Total Time)   Old(ms)   New(ms)   Diff(Invocations)   Old(#)   New(#)   Method"/>
-                </f:facet>
-                
- 		 		<rich:column style="width:500px" sortBy="#{compareResult.difftime}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="Diff(Total Time)"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.difftime}"/>
-		     	</rich:column>
-		     	
-		     	<rich:column style="width:500px" sortBy="#{compareResult.OTime}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="Old(ms)"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.OTime}"/>
-		     	</rich:column>
-		     	
-		     	<rich:column style="width:500px" sortBy="#{compareResult.NTime}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="New(ms)"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.NTime}"/>
-		     	</rich:column>
-		     	
-		     	<rich:column style="width:500px" sortBy="#{compareResult.diffCount}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="Diff(Invocations)"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.diffCount}"/>
-		     	</rich:column>
-		     	
-		     	<rich:column style="width:500px" sortBy="#{compareResult.OCount}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="Old(#)"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.OCount}"/>
-		     	</rich:column>
-		     	
-		     	<rich:column style="width:500px" sortBy="#{compareResult.NCount}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="New(#)"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.NCount}"/>
-		     	</rich:column>
-		     	
-		     	 <rich:column style="width:500px" sortBy="#{compareResult.methodName}"> 
- 		 			<f:facet name="header"> 
-                        <h:outputText value="Method"/>
-                	</f:facet>
-                	<h:outputText value="#{compareResult.methodName}"/>
-		     	</rich:column>
-		     	
-		     </rich:dataTable>
-		</h:form>
-		</ui:define>
-	</ui:composition>
-
-</html>
\ No newline at end of file

Deleted: branches/JBossProfiler2/src/main/www/compare_snapshots.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/compare_snapshots.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/compare_snapshots.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,26 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="http://richfaces.org/a4j"
-      xmlns:rich="http://richfaces.org/rich"
-      xmlns:richfaces="http://richfaces.ajax4jsf.org/rich"
-      xmlns:ajax="https://ajax4jsf.dev.java.net/ajax">
-
-	<ui:composition template="/template/comparetemplate.xhtml">
-	<ui:define name="compareContent">
-			<h:outputText value="Please choose two snapshots *.jps file for analyzing."/>
-			<p></p>
-		
-			<h:selectManyListbox value="#{compareSnapshotBean.snapshotsToCompare}" style="height:300px;width:500px">
-    			<f:selectItems value="#{compareSnapshotBean.JPSs}" />
-			</h:selectManyListbox>
-			<p></p>
-			<a4j:commandLink action="#{compareSnapshotBean.analyzeAction}" onclick="document.location.href='./compare_methods.faces'">
-        		<h:outputText value="Compare the selected two snapshots" /> 
-        	</a4j:commandLink>
-	</ui:define>
-	</ui:composition>
-
-</html>

Copied: branches/JBossProfiler2/src/main/www/comparemethods.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/compare_methods.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/comparemethods.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/comparemethods.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich">
+
+	<ui:composition template="/template/comparetemplate.xhtml">
+		<ui:define name="compareContent">
+		<h:form>
+			<h:outputText value="The methods #{compareSnapshotBean.snapshotsToCompare[0]} and #{compareSnapshotBean.snapshotsToCompare[1]} comparing results is: "/>
+			<p></p>
+			
+			<rich:datascroller align="left" for="compareSnapshotsTable" maxPages="20"/>
+				<rich:spacer height="30"/>
+            
+    			<rich:dataTable id="compareSnapshotsTable" rows="10" value="#{compareSnapshotBean.compareSnapshotBeans}" var="compareResult" width="500px" columnClasses="center" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
+    			<f:facet name="label"> 
+                        <h:outputText value="Diff(Total Time)   Old(ms)   New(ms)   Diff(Invocations)   Old(#)   New(#)   Method"/>
+                </f:facet>
+                
+ 		 		<rich:column style="width:500px" sortBy="#{compareResult.difftime}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="Diff(Total Time)"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.difftime}"/>
+		     	</rich:column>
+		     	
+		     	<rich:column style="width:500px" sortBy="#{compareResult.OTime}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="Old(ms)"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.OTime}"/>
+		     	</rich:column>
+		     	
+		     	<rich:column style="width:500px" sortBy="#{compareResult.NTime}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="New(ms)"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.NTime}"/>
+		     	</rich:column>
+		     	
+		     	<rich:column style="width:500px" sortBy="#{compareResult.diffCount}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="Diff(Invocations)"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.diffCount}"/>
+		     	</rich:column>
+		     	
+		     	<rich:column style="width:500px" sortBy="#{compareResult.OCount}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="Old(#)"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.OCount}"/>
+		     	</rich:column>
+		     	
+		     	<rich:column style="width:500px" sortBy="#{compareResult.NCount}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="New(#)"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.NCount}"/>
+		     	</rich:column>
+		     	
+		     	 <rich:column style="width:500px" sortBy="#{compareResult.methodName}"> 
+ 		 			<f:facet name="header"> 
+                        <h:outputText value="Method"/>
+                	</f:facet>
+                	<h:outputText value="#{compareResult.methodName}"/>
+		     	</rich:column>
+		     	
+		     </rich:dataTable>
+		</h:form>
+		</ui:define>
+	</ui:composition>
+
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/comparemethods.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Copied: branches/JBossProfiler2/src/main/www/comparesnapshots.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/compare_snapshots.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/comparesnapshots.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/comparesnapshots.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="http://richfaces.org/a4j"
+      xmlns:rich="http://richfaces.org/rich"
+      xmlns:richfaces="http://richfaces.ajax4jsf.org/rich"
+      xmlns:ajax="https://ajax4jsf.dev.java.net/ajax">
+
+	<ui:composition template="/template/comparetemplate.xhtml">
+	<ui:define name="compareContent">
+			<h:outputText value="Please choose two snapshots *.jps file for analyzing."/>
+			<p></p>
+		
+			<h:selectManyListbox value="#{compareSnapshotBean.snapshotsToCompare}" style="height:300px;width:500px">
+    			<f:selectItems value="#{compareSnapshotBean.JPSs}" />
+			</h:selectManyListbox>
+			<p></p>
+			<a4j:commandLink action="#{compareSnapshotBean.analyzeAction}" onclick="document.location.href='./compare_methods.faces'">
+        		<h:outputText value="Compare the selected two snapshots" /> 
+        	</a4j:commandLink>
+	</ui:define>
+	</ui:composition>
+
+</html>


Property changes on: branches/JBossProfiler2/src/main/www/comparesnapshots.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Deleted: branches/JBossProfiler2/src/main/www/listSnapshot.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/listSnapshot.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/listSnapshot.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,93 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="http://richfaces.org/a4j"
-	xmlns:rich="http://richfaces.org/rich">
-
-	<ui:composition template="/template/head.xhtml">
-		<ui:define name="mainContent">
-		<h:panelGrid border="0" columns="2" columnClasses="wholecol" style="width: 150px">
-		<h:form>
-		<rich:panel style="background-color: AliceBlue; height: 915px; width: 150px; background-position: left center; padding-right: 1px; padding-left: 1px; padding-top: 1px; border-top-style: solid; margin-bottom: 1px; border-right-style: solid; padding-bottom: 1px; border-bottom-color: LightBlue; border-bottom-style: solid; margin-right: 1px; border-left-color: LightBlue; border-top-color: LightBlue; border-right-color: LightBlue; border-left-style: solid; margin-left: 1px; margin-top: 1px; font-size:32px" >
-			<h:outputLabel value="Snapshot Operations"/>
-			<p>
-			</p>
-			<h:commandLink action="${basicOptBean.takeSnapshot}"> Take Snapshot
-			</h:commandLink>
-			<p>
-			</p>
-			<a href="listSnapshot.faces">  List Snapshots </a>
-			<p>
-			</p>
-			<h:commandLink action="${basicOptBean.clearSnapshot}">  Clear Snapshots
-			</h:commandLink>
-		</rich:panel>
-		</h:form>
-		
-
-			<a4j:region id="listSnapshotRegion">
-	    	<a4j:form  id="listSnapshotForm" ajaxSubmit="true" rendered="true"> 
-	    	<a4j:outputPanel id="listSnapshotPanel" layout="block">
-			
-			<rich:panel style="height:919px;width:822px">			
-			<h:outputText value="All the snapshots are listed here"/>    
-			<h:form>
-				<rich:panel>
-				<rich:datascroller align="left" for="snapshotsTable" maxPages="20" reRender="sc2" id="sc1"/>
-				<rich:spacer height="30"/>
-            
-    			<rich:dataTable id="snapshotsTable" rows="10" value="#{basicOptBean.snapshots}" var="snapshot" width="500px" columnClasses="center" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
-    			<f:facet name="label"> 
-                        <h:outputText value="Snapshot start time --> stop time"/>
-                </f:facet>
-                
- 		 		<rich:column style="width:500px" sortBy="#{snapshot}" onclick="document.location.href='./listSnapshot.faces'"> 
-                	<h:outputText value="#{snapshot}"/>
-                	<rich:toolTip direction="top-right" showDelay="500">
-            			<span style="white-space:nowrap"> Click to choose one snapshot for save!<br/></span>
-            		</rich:toolTip>
-		     	</rich:column>
-
-		     	<a4j:support event="onRowClick" action="#{basicOptBean.selectSnapshotAction}" reRender="listSnapshotPanel,selectedOutput">
-		     		<a4j:actionparam name="selected" value="#{snapshot}" assignTo="#{basicOptBean.selectSnapshot}">
-		     		</a4j:actionparam>
-				</a4j:support>
-				</rich:dataTable>
-				</rich:panel>
-				
-				<rich:spacer height="30"/>
-				
-				<rich:panel id="savePanel" rendered="#{basicOptBean.panelShows}">
-				<h:outputText id="selectedOutput" value="the selected snapshot is No.#{basicOptBean.selectSnapshot}"/>
-				
-				<p></p>
-				<h:outputText value="Input the snapshot name. If it's blank, the name based on time is generated."/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>
-        		
-				<h:inputText id="inputSaveName" value="#{basicOptBean.saveSnapshotName}"/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>			
-				<br/>
-				
-				<a4j:commandButton id="savebutton" value="Save" action="#{basicOptBean.selectSaveSnapshotAction}" reRender="inputSaveName,saveEcho">
-					<rich:componentControl for="saveSnapshotPanel" attachTo="savebutton" operation="hide" event="onclick"/>
-				</a4j:commandButton>
-				<p>
-				</p>
-				
-				<h:outputText id="saveEcho" value="#{basicOptBean.saveEcho}"/>
-				</rich:panel>
-			</h:form>
-
-			</rich:panel>
-    		</a4j:outputPanel>
-    		</a4j:form>
-			</a4j:region>	
-		</h:panelGrid>
-		</ui:define>
-	</ui:composition>
-
-</html>
\ No newline at end of file

Copied: branches/JBossProfiler2/src/main/www/listsnapshot.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/listSnapshot.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/listsnapshot.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/listsnapshot.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,93 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich">
+
+	<ui:composition template="/template/head.xhtml">
+		<ui:define name="mainContent">
+		<h:panelGrid border="0" columns="2" columnClasses="wholecol" style="width: 150px">
+		<h:form>
+		<rich:panel style="background-color: AliceBlue; height: 915px; width: 150px; background-position: left center; padding-right: 1px; padding-left: 1px; padding-top: 1px; border-top-style: solid; margin-bottom: 1px; border-right-style: solid; padding-bottom: 1px; border-bottom-color: LightBlue; border-bottom-style: solid; margin-right: 1px; border-left-color: LightBlue; border-top-color: LightBlue; border-right-color: LightBlue; border-left-style: solid; margin-left: 1px; margin-top: 1px; font-size:32px" >
+			<h:outputLabel value="Snapshot Operations"/>
+			<p>
+			</p>
+			<h:commandLink action="${basicOptBean.takeSnapshot}"> Take Snapshot
+			</h:commandLink>
+			<p>
+			</p>
+			<a href="listSnapshot.faces">  List Snapshots </a>
+			<p>
+			</p>
+			<h:commandLink action="${basicOptBean.clearSnapshot}">  Clear Snapshots
+			</h:commandLink>
+		</rich:panel>
+		</h:form>
+		
+
+			<a4j:region id="listSnapshotRegion">
+	    	<a4j:form  id="listSnapshotForm" ajaxSubmit="true" rendered="true"> 
+	    	<a4j:outputPanel id="listSnapshotPanel" layout="block">
+			
+			<rich:panel style="height:919px;width:822px">			
+			<h:outputText value="All the snapshots are listed here"/>    
+			<h:form>
+				<rich:panel>
+				<rich:datascroller align="left" for="snapshotsTable" maxPages="20" reRender="sc2" id="sc1"/>
+				<rich:spacer height="30"/>
+            
+    			<rich:dataTable id="snapshotsTable" rows="10" value="#{basicOptBean.snapshots}" var="snapshot" width="500px" columnClasses="center" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
+    			<f:facet name="label"> 
+                        <h:outputText value="Snapshot start time --> stop time"/>
+                </f:facet>
+                
+ 		 		<rich:column style="width:500px" sortBy="#{snapshot}" onclick="document.location.href='./listSnapshot.faces'"> 
+                	<h:outputText value="#{snapshot}"/>
+                	<rich:toolTip direction="top-right" showDelay="500">
+            			<span style="white-space:nowrap"> Click to choose one snapshot for save!<br/></span>
+            		</rich:toolTip>
+		     	</rich:column>
+
+		     	<a4j:support event="onRowClick" action="#{basicOptBean.selectSnapshotAction}" reRender="listSnapshotPanel,selectedOutput">
+		     		<a4j:actionparam name="selected" value="#{snapshot}" assignTo="#{basicOptBean.selectSnapshot}">
+		     		</a4j:actionparam>
+				</a4j:support>
+				</rich:dataTable>
+				</rich:panel>
+				
+				<rich:spacer height="30"/>
+				
+				<rich:panel id="savePanel" rendered="#{basicOptBean.panelShows}">
+				<h:outputText id="selectedOutput" value="the selected snapshot is No.#{basicOptBean.selectSnapshot}"/>
+				
+				<p></p>
+				<h:outputText value="Input the snapshot name. If it's blank, the name based on time is generated."/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>
+        		
+				<h:inputText id="inputSaveName" value="#{basicOptBean.saveSnapshotName}"/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>			
+				<br/>
+				
+				<a4j:commandButton id="savebutton" value="Save" action="#{basicOptBean.selectSaveSnapshotAction}" reRender="inputSaveName,saveEcho">
+					<rich:componentControl for="saveSnapshotPanel" attachTo="savebutton" operation="hide" event="onclick"/>
+				</a4j:commandButton>
+				<p>
+				</p>
+				
+				<h:outputText id="saveEcho" value="#{basicOptBean.saveEcho}"/>
+				</rich:panel>
+			</h:form>
+
+			</rich:panel>
+    		</a4j:outputPanel>
+    		</a4j:form>
+			</a4j:region>	
+		</h:panelGrid>
+		</ui:define>
+	</ui:composition>
+
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/listsnapshot.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Deleted: branches/JBossProfiler2/src/main/www/load_hotspots.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/load_hotspots.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/load_hotspots.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,178 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="http://richfaces.org/a4j"
-	xmlns:rich="http://richfaces.org/rich">
-
-	<ui:composition template="/template/loadtemplate.xhtml">
-		<ui:define name="loadContent">
-		<rich:tabPanel id="classTabPanel" width="40%" headerAlignment="left">
-		<rich:tab label="hotspot" styleClass="cc">
-		<h:form>
-			<rich:datascroller align="left" for="hotspots" maxPages="20"/>
-			<rich:spacer height="30"/>
-			<rich:dataTable width="483" id="hotspots" rows="12" columnClasses="wholecol" value="#{overviewBean.hotspots}" var="hsb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
-				<rich:column id="Count" sortBy="#{hsb.count}">
-							<f:facet name="header"><h:outputText value="Count"/></f:facet>
-				            <h:outputText value="#{hsb.count}"/>
-				        </rich:column>
-				        <rich:column id="MostTimeMs" sortBy="#{hsb.totalTime}">
-				            <f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
-				            <h:outputText value="#{hsb.totalTime}">
-				            	<f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				        <rich:column id="Avg" sortBy="#{hsb.totalTime/hsb.count}">
-				            <f:facet name="header"><h:outputText value="Average"/></f:facet>
-				            <h:outputText value="#{hsb.totalTime/hsb.count}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				                <rich:column id="Percentage" sortBy="#{hsb.percent}">
-				            <f:facet name="header"><h:outputText value="Percentage"/></f:facet>
-				            <h:outputText value="#{hsb.percent}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				        <rich:column id="Method" sortBy="#{hsb.prettyName}" width="250">
-				            <f:facet name="header"><h:outputText value="Method"/></f:facet>
-				            <h:outputText value="#{hsb.prettyName}"/>
-				        </rich:column>
-			</rich:dataTable>
-			</h:form>
-			<br/>
-		</rich:tab>
-		
-		<rich:tab label="package" styleClass="cc">
-			<h:form>
-			<rich:datascroller align="left" for="hotspots" maxPages="20"/>
-			<rich:spacer height="30"/>
-			<rich:dataTable width="483" id="hotspots" rows="20" columnClasses="wholecol" value="#{overviewBean.packages}" var="pgb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
-	            <rich:column id="Percentage" sortBy="#{pgb.percent}">
-				 	<f:facet name="header"><h:outputText value="Percentage"/></f:facet>
-				    <h:outputText value="#{pgb.percent}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column id="TotalTime" sortBy="#{pgb.totalTime}">
-				 	<f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
-				    <h:outputText value="#{pgb.totalTime}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column id="Packagename" sortBy="#{pgb.prettyName}">
-				 	<f:facet name="header"><h:outputText value="Package Name"/></f:facet>
-				    <h:outputText value="#{pgb.prettyName}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-			</rich:dataTable>
-			</h:form>
-			<br/>
-		</rich:tab>
-				
-		<rich:tab label="class/method">
-	
-			<h:outputText value="Please click one class for detailed method info."/>
-			<h:form>
-			<rich:datascroller align="left" for="classes" maxPages="20"/>
-			<rich:spacer height="30"/>
-			<rich:dataTable width="483" id="classes" rows="20" columnClasses="wholecol" value="#{classBean.classes}" var="clazzb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'" rowKeyVar="rowClassVar">
-				<rich:column sortBy="#{clazzb.className}">
-				 	<f:facet name="header"><h:outputText value="Class Name"/></f:facet>
-				    <h:outputText value="#{clazzb.className}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{clazzb.type}">
-				 	<f:facet name="header"><h:outputText value="Type"/></f:facet>
-				    <h:outputText value="#{clazzb.type}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{clazzb.totalTime}">
-				 	<f:facet name="header"><h:outputText value="Total Time"/></f:facet>
-				    <h:outputText value="#{clazzb.totalTime}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{clazzb.waitTime}">
-				 	<f:facet name="header"><h:outputText value="Wait Time"/></f:facet>
-				    <h:outputText value="#{clazzb.waitTime}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{clazzb.allocCount}">
-				 	<f:facet name="header"><h:outputText value="Invocations"/></f:facet>
-				    <h:outputText value="#{clazzb.allocCount}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-		
-            <a4j:support event="onRowClick" action="#{classBean.fireMethodsInfo}" reRender="methodsDataTable,classOutputText">
-            	<a4j:actionparam name="selected" value="#{clazzb.className}" assignTo="#{classBean.selectedClass}">
-            	</a4j:actionparam>
-			</a4j:support>
-			</rich:dataTable>
-			</h:form>
-
-			<br/>
-			<p></p>
-			
-			<h:outputText id="classOutputText" value="Class #{classBean.selectedClass} is chosen,please see the
-			methods info below!"/>
-			
-			<h:form>
-			<rich:datascroller align="left" for="classes" maxPages="20"/>
-			<rich:spacer height="30"/>
-			<rich:dataTable width="483" id="methodsDataTable" rows="20" columnClasses="wholecol" value="#{methodBean.methods}" var="methodb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
-				<rich:column sortBy="#{methodb.count}">
-				 	<f:facet name="header"><h:outputText value="Counts"/></f:facet>
-				    <h:outputText value="#{methodb.count}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{methodb.totalTime}">
-				 	<f:facet name="header"><h:outputText value="Total Time"/></f:facet>
-				    <h:outputText value="#{methodb.totalTime}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{methodb.CPercent}">
-				 	<f:facet name="header"><h:outputText value="Class Percent"/></f:facet>
-				    <h:outputText value="#{methodb.CPercent}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{methodb.TPercent}">
-				 	<f:facet name="header"><h:outputText value="Total Percent"/></f:facet>
-				    <h:outputText value="#{methodb.TPercent}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-				
-				<rich:column sortBy="#{methodb.prettyName}">
-				 	<f:facet name="header"><h:outputText value="Method Name"/></f:facet>
-				    <h:outputText value="#{methodb.prettyName}">
-				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				    </h:outputText>
-				</rich:column>
-			</rich:dataTable>
-			</h:form>
-		</rich:tab>
-	</rich:tabPanel>
-		</ui:define>
-	</ui:composition>
-
-</html>
\ No newline at end of file

Deleted: branches/JBossProfiler2/src/main/www/load_overview.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/load_overview.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/load_overview.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,138 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="http://richfaces.org/a4j"
-	xmlns:rich="http://richfaces.org/rich">
-
-	<ui:composition template="/template/loadtemplate.xhtml">
-		<ui:define name="loadContent">
-			<h:panelGrid border="0" columns="2" columnClasses="col" style="color: Black; background-color: WhiteSmoke; left: auto; clear: left; font-size: 12px; margin-top: auto; margin-bottom: auto; margin-right: auto; margin-left: auto; bottom: auto; right: auto; background-position: left left; top: auto; vertical-align: top; background-attachment: scroll; background-repeat: repeat">
-				<f:facet name="header">
-				<h:outputText value="Overview"/>		
-				</f:facet>
-				
-								<rich:panel style="middlepanel">
-						<f:facet name="header">
-						<h:outputText value="Hotspots"/>		
-						</f:facet>
-				<rich:scrollableDataTable value="#{overviewBean.hotspots}" var="hsb" id="HotSpot" rows="0" style="middlepanel" height="200px" width="360px">
-						<rich:column id="Count" sortBy="#{hsb.count}">
-							<f:facet name="header"><h:outputText value="Count"/></f:facet>
-				            <h:outputText value="#{hsb.count}"/>
-				        </rich:column>
-				        <rich:column id="MostTimeMs" sortBy="#{hsb.totalTime}">
-				            <f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
-				            <h:outputText value="#{hsb.totalTime}">
-				            	<f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				        <rich:column id="Avg" sortBy="#{hsb.totalTime/hsb.count}">
-				            <f:facet name="header"><h:outputText value="Average"/></f:facet>
-				            <h:outputText value="#{hsb.totalTime/hsb.count}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				                <rich:column id="Percentage" sortBy="#{hsb.percent}">
-				            <f:facet name="header"><h:outputText value="Percentage"/></f:facet>
-				            <h:outputText value="#{hsb.percent}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				        <rich:column id="Method" sortBy="#{hsb.prettyName}" width="250">
-				            <f:facet name="header"><h:outputText value="Method"/></f:facet>
-				            <h:outputText value="#{hsb.prettyName}"/>
-				        </rich:column>
-						</rich:scrollableDataTable>
-				</rich:panel>				
-
-				<rich:panel style="middlepanel">
-						<f:facet name="header">
-						<h:outputText value="Most Time"/>		
-						</f:facet>
-						<rich:scrollableDataTable value="#{overviewBean.mostTime}" var="mts" id="MostTime" rows="0" style="middlescroll" width="360px" height="200px">
-						<rich:column id="Count">
-							<f:facet name="header"><h:outputText value="Count"/></f:facet>
-				            <h:outputText value="#{mts.count}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				        <rich:column id="MostTimeMs">
-				            <f:facet name="header"><h:outputText value="Most Time(ms)"/></f:facet>
-				            <h:outputText value="#{mts.totalTime}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				                <rich:column id="Percentage">
-				            <f:facet name="header"><h:outputText value="Percent"/></f:facet>
-				            <h:outputText value="#{mts.percent}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-				        <rich:column id="Method" width="500">
-				            <f:facet name="header"><h:outputText value="Method"/></f:facet>
-				            <h:outputText value="#{mts.prettyName}"/>
-				        </rich:column>
-						</rich:scrollableDataTable>
-				</rich:panel>		
-			
-				<rich:panel style="middlepanel">
-				<f:facet name="header">
-				<h:outputText value="Classes"/>		
-						</f:facet>
-						<rich:scrollableDataTable value="#{classBean.classes}" var="classb" id="Classes" rows="0" style="middlescroll" height="200px" width="360px">
-						<rich:column id="ClassCname">
-							<f:facet name="header"><h:outputText value="Class Name"/></f:facet>
-				            <h:outputText value="#{classb.className}"/>
-				        </rich:column>
-				        <rich:column id="ClassCtype">
-				            <f:facet name="header"><h:outputText value="Type"/></f:facet>
-				            <h:outputText value="#{classb.type}"/>
-				        </rich:column>
-				        <rich:column id="ClassCms">
-				            <f:facet name="header"><h:outputText value="Ms"/></f:facet>
-				            <h:outputText value="#{classb.totalTime}"/>
-				        </rich:column>
-						</rich:scrollableDataTable>
-				</rich:panel>
-			
-				<rich:panel style="middlepanel">
-				<f:facet name="header">
-				<h:outputText value="Threads Info"/>		
-						</f:facet>
-						<rich:scrollableDataTable value="#{overviewBean.threads}" var="ths" id="Overview" rows="0" sortOrder="#{threadsBean.millionSeconds}" style="middlescroll" height="200px" width="360px">
-						<rich:column id="Threads">
-							<f:facet name="header"><h:outputText value="Threads"/></f:facet>
-				            <h:outputText value="#{ths.name}"/>
-				        </rich:column>
-				        <rich:column id="Ms">
-				            <f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
-				            <h:outputText value="#{ths.totalTime/1000000}">
-				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
-				            </h:outputText>
-				        </rich:column>
-						</rich:scrollableDataTable>
-				</rich:panel>
-			
-			 	<rich:panel style="middlepanel">
-				<f:facet name="header">
-				<h:outputText value="Allocations"/>		
-						</f:facet>
-						<rich:scrollableDataTable value="#{overviewBean.allocations}" var="allob" id="Allocations" rows="0" style="middlescroll" height="200px" width="360px">
-						<rich:column id="AlloMethodName" width="250">
-							<f:facet name="header"><h:outputText value="Class Name"/></f:facet>
-				            <h:outputText value="#{allob.className}"/>
-				        </rich:column>
-				        <rich:column id="AlloTimes">
-				            <f:facet name="header"><h:outputText value="Times"/></f:facet>
-				            <h:outputText value="#{allob.count}"/>
-				        </rich:column>
-						</rich:scrollableDataTable>
-				</rich:panel>
-				
-	</h:panelGrid>
-		</ui:define>
-	</ui:composition>
-
-</html>
\ No newline at end of file

Deleted: branches/JBossProfiler2/src/main/www/load_snapshot.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/load_snapshot.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/load_snapshot.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:ui="http://java.sun.com/jsf/facelets"
-      xmlns:a4j="http://richfaces.org/a4j"
-      xmlns:rich="http://richfaces.org/rich"
-      xmlns:richfaces="http://richfaces.ajax4jsf.org/rich"
-      xmlns:ajax="https://ajax4jsf.dev.java.net/ajax">
-
-	<ui:composition template="/template/loadtemplate.xhtml">
-	<ui:define name="loadContent">
-			<h:outputText value="Please choose one snapshot *.jps file for analyzing."/>
-			<p></p>
-			<h:selectOneListbox value="#{loadSnapshotBean.snapshotToLoad}" style="height:300px;width:500px">
-    			<f:selectItems value="#{loadSnapshotBean.JPSs}" />
-			</h:selectOneListbox>
-			<p></p>
-			<a4j:commandLink action="#{loadSnapshotBean.analyzeAction}" onclick="document.location.href='./load_overview.faces'">
-        		<h:outputText value="Analyze this snapshot" /> 
-        	</a4j:commandLink>
-	</ui:define>
-	</ui:composition>
-
-</html>
\ No newline at end of file

Deleted: branches/JBossProfiler2/src/main/www/load_thread_hotspots.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/load_thread_hotspots.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/load_thread_hotspots.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,62 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="http://richfaces.org/a4j"
-	xmlns:rich="http://richfaces.org/rich">
-
-	<ui:composition template="/template/loadtemplate.xhtml">
-		<ui:define name="loadContent">
-		<h:form>
-		<h:panelGrid columns="2">
-		
-		<h:outputText value="Thread Selection:" style="width:150px"/>	
-		<h:selectOneMenu value="#{threadHotspotBean.selectItem}" style="width: 500px" valueChangeListener="#{threadHotspotBean.selectionChanged}"
-			lable="#{threadHotspotBean.selectItem}">
-			<a4j:support event="onchange" reRender="selectedOutput,callerTable">
-    		</a4j:support>
-    		<f:selectItems value="#{threadHotspotBean.allSelectItems}" />
-		</h:selectOneMenu>
-    	</h:panelGrid>
-    	
-    	<h:outputText id="selectedOutput" value="the selected thread is #{threadHotspotBean.selectItem}"/>
-    	</h:form>	
-    	
-		<rich:separator height="1" style="background-color: white"/>
-		<h:form>
-        <rich:dataTable id="callerTable" value="#{threadHotspotBean.subKeys}" var="key" width="300px" columnClasses="center" rows="25" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
- 		 	<rich:column style="width:200px" sortBy="#{key}"> 
-            	<f:facet name="header"><h:outputText value="caller"/></f:facet>
-                <h:outputText value="#{key}"/>
-            </rich:column>
-            
-            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].className}">
-            	<f:facet name="header"><h:outputText value="callee"/></f:facet>
-                <h:outputText value="#{threadHotspotBean.newMap[key].className}"/> 
-            </rich:column>
-            
-            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].totalTime}">
-            	<f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
-                <h:outputText value="#{threadHotspotBean.newMap[key].totalTime}">
-                	<f:convertNumber maxFractionDigits="2"/>
-                </h:outputText> 
-            </rich:column>
-            
-            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].totalTime/threadHotspotBean.newMap[key].count}">
-            	<f:facet name="header"><h:outputText value="Average Time(ms)"/></f:facet>
-                <h:outputText value="#{threadHotspotBean.newMap[key].totalTime/threadHotspotBean.newMap[key].count}">
-                	<f:convertNumber maxFractionDigits="2"/>
-                </h:outputText>
-            </rich:column>
-            
-            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].count}">
-            	<f:facet name="header"><h:outputText value="Invocations"/></f:facet>
-                <h:outputText value="#{threadHotspotBean.newMap[key].count}"/> 
-            </rich:column>
-
-        </rich:dataTable>  
-    	</h:form>
-	</ui:define>
-	</ui:composition>
-</html>
\ No newline at end of file

Deleted: branches/JBossProfiler2/src/main/www/load_thread_tree.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/load_thread_tree.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/load_thread_tree.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,87 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:a4j="http://richfaces.org/a4j"
-	xmlns:rich="http://richfaces.org/rich">
-
-	<ui:composition template="/template/loadtemplate.xhtml">
-		<ui:define name="loadContent">
-			<f:facet name="header">
-				<h:outputText value="Threads tree"/>		
-			</f:facet>
-
-			<rich:panel id="threadPanel">
-			<h:form>
-			<rich:datascroller align="left" for="threads" maxPages="20"/>
-			<rich:spacer height="30"/>
-			<rich:dataTable width="483" id="threads" rows="20" columnClasses="wholecol" value="#{treeThreadBean.allThreads}" var="threadInfoB" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'" rowKeyVar="rowClassVar">
-				<f:facet name="header">
-					<rich:columnGroup>
-						<h:column>
-						<h:outputText styleClass="headerText" value="Thread No"/>
-						</h:column>
-						<h:column>
-						<h:outputText styleClass="headerText" value="Thread Name"/>
-						</h:column>
-						<h:column>
-						<h:outputText styleClass="headerText" value="Priority"/>
-						</h:column>
-						<h:column>
-						<h:outputText styleClass="headerText" value="Daemon"/>
-						</h:column>
-						<h:column>
-						<h:outputText styleClass="headerText" value="Groups"/>
-						</h:column>
-					</rich:columnGroup>
-				</f:facet>
-				
-			<h:column>
-                <h:outputText value="#{threadInfoB.id}"/>
-            </h:column>
-            <h:column>
-                <h:outputText value="#{threadInfoB.name}"/>
-            </h:column>
-            <h:column>
-                <h:outputText value="#{threadInfoB.priority}"/>
-            </h:column>
-            <h:column>
-                <h:outputText value="#{threadInfoB.daemon}"/>
-            </h:column>
-            <h:column>
-                <h:outputText value="#{threadInfoB.groups}"/>
-            </h:column>
-            
-            <a4j:support event="onRowClick" action="#{treeThreadBean.fireSelectedThread}" reRender="threadOutputText,threadTree">
-            	<a4j:actionparam name="selected" value="#{threadInfoB.id}" assignTo="#{treeThreadBean.selectedThread}">
-            	</a4j:actionparam>
-            	<rich:toolTip direction="top-right" showDelay="500">
-            		<span style="white-space:nowrap"> Click one row to show the threads tree below!<br/></span>
-            	</rich:toolTip>
-			</a4j:support>
-			</rich:dataTable>
-			
-			</h:form>
-			</rich:panel>	
-			
-			<br/>	
-			<h:outputText id="threadOutputText" value="Thread #{treeThreadBean.selectedThread} is chosen,please see the
-			threads info below!"/>	
-			
-		<rich:panel>		
-	 	 <h:form>    
-	 	 <h:form>    
-       	 <rich:tree id="threadTree" style="width:300px" switchType="ajax" stateAdvisor="#{treeDemoStateAdvisor}">
-            <rich:recursiveTreeNodesAdaptor roots="#{treeFrameBean.srcRoots}" var="item" nodes="#{item.children}">
-            </rich:recursiveTreeNodesAdaptor>
-		</rich:tree>
-    	</h:form>
-
-    	</h:form>
-		</rich:panel>	
-		
-		</ui:define>
-	</ui:composition>
-
-</html>
\ No newline at end of file

Copied: branches/JBossProfiler2/src/main/www/loadhotspots.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/load_hotspots.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/loadhotspots.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/loadhotspots.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,178 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich">
+
+	<ui:composition template="/template/loadtemplate.xhtml">
+		<ui:define name="loadContent">
+		<rich:tabPanel id="classTabPanel" width="40%" headerAlignment="left">
+		<rich:tab label="hotspot" styleClass="cc">
+		<h:form>
+			<rich:datascroller align="left" for="hotspots" maxPages="20"/>
+			<rich:spacer height="30"/>
+			<rich:dataTable width="483" id="hotspots" rows="12" columnClasses="wholecol" value="#{overviewBean.hotspots}" var="hsb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
+				<rich:column id="Count" sortBy="#{hsb.count}">
+							<f:facet name="header"><h:outputText value="Count"/></f:facet>
+				            <h:outputText value="#{hsb.count}"/>
+				        </rich:column>
+				        <rich:column id="MostTimeMs" sortBy="#{hsb.totalTime}">
+				            <f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
+				            <h:outputText value="#{hsb.totalTime}">
+				            	<f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				        <rich:column id="Avg" sortBy="#{hsb.totalTime/hsb.count}">
+				            <f:facet name="header"><h:outputText value="Average"/></f:facet>
+				            <h:outputText value="#{hsb.totalTime/hsb.count}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				                <rich:column id="Percentage" sortBy="#{hsb.percent}">
+				            <f:facet name="header"><h:outputText value="Percentage"/></f:facet>
+				            <h:outputText value="#{hsb.percent}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				        <rich:column id="Method" sortBy="#{hsb.prettyName}" width="250">
+				            <f:facet name="header"><h:outputText value="Method"/></f:facet>
+				            <h:outputText value="#{hsb.prettyName}"/>
+				        </rich:column>
+			</rich:dataTable>
+			</h:form>
+			<br/>
+		</rich:tab>
+		
+		<rich:tab label="package" styleClass="cc">
+			<h:form>
+			<rich:datascroller align="left" for="hotspots" maxPages="20"/>
+			<rich:spacer height="30"/>
+			<rich:dataTable width="483" id="hotspots" rows="20" columnClasses="wholecol" value="#{overviewBean.packages}" var="pgb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
+	            <rich:column id="Percentage" sortBy="#{pgb.percent}">
+				 	<f:facet name="header"><h:outputText value="Percentage"/></f:facet>
+				    <h:outputText value="#{pgb.percent}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column id="TotalTime" sortBy="#{pgb.totalTime}">
+				 	<f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
+				    <h:outputText value="#{pgb.totalTime}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column id="Packagename" sortBy="#{pgb.prettyName}">
+				 	<f:facet name="header"><h:outputText value="Package Name"/></f:facet>
+				    <h:outputText value="#{pgb.prettyName}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+			</rich:dataTable>
+			</h:form>
+			<br/>
+		</rich:tab>
+				
+		<rich:tab label="class/method">
+	
+			<h:outputText value="Please click one class for detailed method info."/>
+			<h:form>
+			<rich:datascroller align="left" for="classes" maxPages="20"/>
+			<rich:spacer height="30"/>
+			<rich:dataTable width="483" id="classes" rows="20" columnClasses="wholecol" value="#{classBean.classes}" var="clazzb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'" rowKeyVar="rowClassVar">
+				<rich:column sortBy="#{clazzb.className}">
+				 	<f:facet name="header"><h:outputText value="Class Name"/></f:facet>
+				    <h:outputText value="#{clazzb.className}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{clazzb.type}">
+				 	<f:facet name="header"><h:outputText value="Type"/></f:facet>
+				    <h:outputText value="#{clazzb.type}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{clazzb.totalTime}">
+				 	<f:facet name="header"><h:outputText value="Total Time"/></f:facet>
+				    <h:outputText value="#{clazzb.totalTime}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{clazzb.waitTime}">
+				 	<f:facet name="header"><h:outputText value="Wait Time"/></f:facet>
+				    <h:outputText value="#{clazzb.waitTime}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{clazzb.allocCount}">
+				 	<f:facet name="header"><h:outputText value="Invocations"/></f:facet>
+				    <h:outputText value="#{clazzb.allocCount}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+		
+            <a4j:support event="onRowClick" action="#{classBean.fireMethodsInfo}" reRender="methodsDataTable,classOutputText">
+            	<a4j:actionparam name="selected" value="#{clazzb.className}" assignTo="#{classBean.selectedClass}">
+            	</a4j:actionparam>
+			</a4j:support>
+			</rich:dataTable>
+			</h:form>
+
+			<br/>
+			<p></p>
+			
+			<h:outputText id="classOutputText" value="Class #{classBean.selectedClass} is chosen,please see the
+			methods info below!"/>
+			
+			<h:form>
+			<rich:datascroller align="left" for="classes" maxPages="20"/>
+			<rich:spacer height="30"/>
+			<rich:dataTable width="483" id="methodsDataTable" rows="20" columnClasses="wholecol" value="#{methodBean.methods}" var="methodb" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
+				<rich:column sortBy="#{methodb.count}">
+				 	<f:facet name="header"><h:outputText value="Counts"/></f:facet>
+				    <h:outputText value="#{methodb.count}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{methodb.totalTime}">
+				 	<f:facet name="header"><h:outputText value="Total Time"/></f:facet>
+				    <h:outputText value="#{methodb.totalTime}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{methodb.CPercent}">
+				 	<f:facet name="header"><h:outputText value="Class Percent"/></f:facet>
+				    <h:outputText value="#{methodb.CPercent}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{methodb.TPercent}">
+				 	<f:facet name="header"><h:outputText value="Total Percent"/></f:facet>
+				    <h:outputText value="#{methodb.TPercent}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+				
+				<rich:column sortBy="#{methodb.prettyName}">
+				 	<f:facet name="header"><h:outputText value="Method Name"/></f:facet>
+				    <h:outputText value="#{methodb.prettyName}">
+				    <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				    </h:outputText>
+				</rich:column>
+			</rich:dataTable>
+			</h:form>
+		</rich:tab>
+	</rich:tabPanel>
+		</ui:define>
+	</ui:composition>
+
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/loadhotspots.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Copied: branches/JBossProfiler2/src/main/www/loadoverview.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/load_overview.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/loadoverview.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/loadoverview.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich">
+
+	<ui:composition template="/template/loadtemplate.xhtml">
+		<ui:define name="loadContent">
+			<h:panelGrid border="0" columns="2" columnClasses="col" style="color: Black; background-color: WhiteSmoke; left: auto; clear: left; font-size: 12px; margin-top: auto; margin-bottom: auto; margin-right: auto; margin-left: auto; bottom: auto; right: auto; background-position: left left; top: auto; vertical-align: top; background-attachment: scroll; background-repeat: repeat">
+				<f:facet name="header">
+				<h:outputText value="Overview"/>		
+				</f:facet>
+				
+								<rich:panel style="middlepanel">
+						<f:facet name="header">
+						<h:outputText value="Hotspots"/>		
+						</f:facet>
+				<rich:scrollableDataTable value="#{overviewBean.hotspots}" var="hsb" id="HotSpot" rows="0" style="middlepanel" height="200px" width="360px">
+						<rich:column id="Count" sortBy="#{hsb.count}">
+							<f:facet name="header"><h:outputText value="Count"/></f:facet>
+				            <h:outputText value="#{hsb.count}"/>
+				        </rich:column>
+				        <rich:column id="MostTimeMs" sortBy="#{hsb.totalTime}">
+				            <f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
+				            <h:outputText value="#{hsb.totalTime}">
+				            	<f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				        <rich:column id="Avg" sortBy="#{hsb.totalTime/hsb.count}">
+				            <f:facet name="header"><h:outputText value="Average"/></f:facet>
+				            <h:outputText value="#{hsb.totalTime/hsb.count}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				                <rich:column id="Percentage" sortBy="#{hsb.percent}">
+				            <f:facet name="header"><h:outputText value="Percentage"/></f:facet>
+				            <h:outputText value="#{hsb.percent}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				        <rich:column id="Method" sortBy="#{hsb.prettyName}" width="250">
+				            <f:facet name="header"><h:outputText value="Method"/></f:facet>
+				            <h:outputText value="#{hsb.prettyName}"/>
+				        </rich:column>
+						</rich:scrollableDataTable>
+				</rich:panel>				
+
+				<rich:panel style="middlepanel">
+						<f:facet name="header">
+						<h:outputText value="Most Time"/>		
+						</f:facet>
+						<rich:scrollableDataTable value="#{overviewBean.mostTime}" var="mts" id="MostTime" rows="0" style="middlescroll" width="360px" height="200px">
+						<rich:column id="Count">
+							<f:facet name="header"><h:outputText value="Count"/></f:facet>
+				            <h:outputText value="#{mts.count}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				        <rich:column id="MostTimeMs">
+				            <f:facet name="header"><h:outputText value="Most Time(ms)"/></f:facet>
+				            <h:outputText value="#{mts.totalTime}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				                <rich:column id="Percentage">
+				            <f:facet name="header"><h:outputText value="Percent"/></f:facet>
+				            <h:outputText value="#{mts.percent}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+				        <rich:column id="Method" width="500">
+				            <f:facet name="header"><h:outputText value="Method"/></f:facet>
+				            <h:outputText value="#{mts.prettyName}"/>
+				        </rich:column>
+						</rich:scrollableDataTable>
+				</rich:panel>		
+			
+				<rich:panel style="middlepanel">
+				<f:facet name="header">
+				<h:outputText value="Classes"/>		
+						</f:facet>
+						<rich:scrollableDataTable value="#{classBean.classes}" var="classb" id="Classes" rows="0" style="middlescroll" height="200px" width="360px">
+						<rich:column id="ClassCname">
+							<f:facet name="header"><h:outputText value="Class Name"/></f:facet>
+				            <h:outputText value="#{classb.className}"/>
+				        </rich:column>
+				        <rich:column id="ClassCtype">
+				            <f:facet name="header"><h:outputText value="Type"/></f:facet>
+				            <h:outputText value="#{classb.type}"/>
+				        </rich:column>
+				        <rich:column id="ClassCms">
+				            <f:facet name="header"><h:outputText value="Ms"/></f:facet>
+				            <h:outputText value="#{classb.totalTime}"/>
+				        </rich:column>
+						</rich:scrollableDataTable>
+				</rich:panel>
+			
+				<rich:panel style="middlepanel">
+				<f:facet name="header">
+				<h:outputText value="Threads Info"/>		
+						</f:facet>
+						<rich:scrollableDataTable value="#{overviewBean.threads}" var="ths" id="Overview" rows="0" sortOrder="#{threadsBean.millionSeconds}" style="middlescroll" height="200px" width="360px">
+						<rich:column id="Threads">
+							<f:facet name="header"><h:outputText value="Threads"/></f:facet>
+				            <h:outputText value="#{ths.name}"/>
+				        </rich:column>
+				        <rich:column id="Ms">
+				            <f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
+				            <h:outputText value="#{ths.totalTime/1000000}">
+				            <f:convertNumber maxFractionDigits="2"></f:convertNumber>
+				            </h:outputText>
+				        </rich:column>
+						</rich:scrollableDataTable>
+				</rich:panel>
+			
+			 	<rich:panel style="middlepanel">
+				<f:facet name="header">
+				<h:outputText value="Allocations"/>		
+						</f:facet>
+						<rich:scrollableDataTable value="#{overviewBean.allocations}" var="allob" id="Allocations" rows="0" style="middlescroll" height="200px" width="360px">
+						<rich:column id="AlloMethodName" width="250">
+							<f:facet name="header"><h:outputText value="Class Name"/></f:facet>
+				            <h:outputText value="#{allob.className}"/>
+				        </rich:column>
+				        <rich:column id="AlloTimes">
+				            <f:facet name="header"><h:outputText value="Times"/></f:facet>
+				            <h:outputText value="#{allob.count}"/>
+				        </rich:column>
+						</rich:scrollableDataTable>
+				</rich:panel>
+				
+	</h:panelGrid>
+		</ui:define>
+	</ui:composition>
+
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/loadoverview.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Copied: branches/JBossProfiler2/src/main/www/loadsnapshot.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/load_snapshot.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/loadsnapshot.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/loadsnapshot.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:a4j="http://richfaces.org/a4j"
+      xmlns:rich="http://richfaces.org/rich"
+      xmlns:richfaces="http://richfaces.ajax4jsf.org/rich"
+      xmlns:ajax="https://ajax4jsf.dev.java.net/ajax">
+
+	<ui:composition template="/template/loadtemplate.xhtml">
+	<ui:define name="loadContent">
+			<h:outputText value="Please choose one snapshot *.jps file for analyzing."/>
+			<p></p>
+			<h:selectOneListbox value="#{loadSnapshotBean.snapshotToLoad}" style="height:300px;width:500px">
+    			<f:selectItems value="#{loadSnapshotBean.JPSs}" />
+			</h:selectOneListbox>
+			<p></p>
+			<a4j:commandLink action="#{loadSnapshotBean.analyzeAction}" onclick="document.location.href='./load_overview.faces'">
+        		<h:outputText value="Analyze this snapshot" /> 
+        	</a4j:commandLink>
+	</ui:define>
+	</ui:composition>
+
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/loadsnapshot.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Copied: branches/JBossProfiler2/src/main/www/loadthreadhotspots.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/load_thread_hotspots.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/loadthreadhotspots.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/loadthreadhotspots.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich">
+
+	<ui:composition template="/template/loadtemplate.xhtml">
+		<ui:define name="loadContent">
+		<h:form>
+		<h:panelGrid columns="2">
+		
+		<h:outputText value="Thread Selection:" style="width:150px"/>	
+		<h:selectOneMenu value="#{threadHotspotBean.selectItem}" style="width: 500px" valueChangeListener="#{threadHotspotBean.selectionChanged}"
+			lable="#{threadHotspotBean.selectItem}">
+			<a4j:support event="onchange" reRender="selectedOutput,callerTable">
+    		</a4j:support>
+    		<f:selectItems value="#{threadHotspotBean.allSelectItems}" />
+		</h:selectOneMenu>
+    	</h:panelGrid>
+    	
+    	<h:outputText id="selectedOutput" value="the selected thread is #{threadHotspotBean.selectItem}"/>
+    	</h:form>	
+    	
+		<rich:separator height="1" style="background-color: white"/>
+		<h:form>
+        <rich:dataTable id="callerTable" value="#{threadHotspotBean.subKeys}" var="key" width="300px" columnClasses="center" rows="25" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'">
+ 		 	<rich:column style="width:200px" sortBy="#{key}"> 
+            	<f:facet name="header"><h:outputText value="caller"/></f:facet>
+                <h:outputText value="#{key}"/>
+            </rich:column>
+            
+            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].className}">
+            	<f:facet name="header"><h:outputText value="callee"/></f:facet>
+                <h:outputText value="#{threadHotspotBean.newMap[key].className}"/> 
+            </rich:column>
+            
+            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].totalTime}">
+            	<f:facet name="header"><h:outputText value="Total Time(ms)"/></f:facet>
+                <h:outputText value="#{threadHotspotBean.newMap[key].totalTime}">
+                	<f:convertNumber maxFractionDigits="2"/>
+                </h:outputText> 
+            </rich:column>
+            
+            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].totalTime/threadHotspotBean.newMap[key].count}">
+            	<f:facet name="header"><h:outputText value="Average Time(ms)"/></f:facet>
+                <h:outputText value="#{threadHotspotBean.newMap[key].totalTime/threadHotspotBean.newMap[key].count}">
+                	<f:convertNumber maxFractionDigits="2"/>
+                </h:outputText>
+            </rich:column>
+            
+            <rich:column style="width:150px" sortBy="#{threadHotspotBean.newMap[key].count}">
+            	<f:facet name="header"><h:outputText value="Invocations"/></f:facet>
+                <h:outputText value="#{threadHotspotBean.newMap[key].count}"/> 
+            </rich:column>
+
+        </rich:dataTable>  
+    	</h:form>
+	</ui:define>
+	</ui:composition>
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/loadthreadhotspots.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Copied: branches/JBossProfiler2/src/main/www/loadthreadtree.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/load_thread_tree.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/loadthreadtree.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/loadthreadtree.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich">
+
+	<ui:composition template="/template/loadtemplate.xhtml">
+		<ui:define name="loadContent">
+			<f:facet name="header">
+				<h:outputText value="Threads tree"/>		
+			</f:facet>
+
+			<rich:panel id="threadPanel">
+			<h:form>
+			<rich:datascroller align="left" for="threads" maxPages="20"/>
+			<rich:spacer height="30"/>
+			<rich:dataTable width="483" id="threads" rows="20" columnClasses="wholecol" value="#{treeThreadBean.allThreads}" var="threadInfoB" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'" rowKeyVar="rowClassVar">
+				<f:facet name="header">
+					<rich:columnGroup>
+						<h:column>
+						<h:outputText styleClass="headerText" value="Thread No"/>
+						</h:column>
+						<h:column>
+						<h:outputText styleClass="headerText" value="Thread Name"/>
+						</h:column>
+						<h:column>
+						<h:outputText styleClass="headerText" value="Priority"/>
+						</h:column>
+						<h:column>
+						<h:outputText styleClass="headerText" value="Daemon"/>
+						</h:column>
+						<h:column>
+						<h:outputText styleClass="headerText" value="Groups"/>
+						</h:column>
+					</rich:columnGroup>
+				</f:facet>
+				
+			<h:column>
+                <h:outputText value="#{threadInfoB.id}"/>
+            </h:column>
+            <h:column>
+                <h:outputText value="#{threadInfoB.name}"/>
+            </h:column>
+            <h:column>
+                <h:outputText value="#{threadInfoB.priority}"/>
+            </h:column>
+            <h:column>
+                <h:outputText value="#{threadInfoB.daemon}"/>
+            </h:column>
+            <h:column>
+                <h:outputText value="#{threadInfoB.groups}"/>
+            </h:column>
+            
+            <a4j:support event="onRowClick" action="#{treeThreadBean.fireSelectedThread}" reRender="threadOutputText,threadTree">
+            	<a4j:actionparam name="selected" value="#{threadInfoB.id}" assignTo="#{treeThreadBean.selectedThread}">
+            	</a4j:actionparam>
+            	<rich:toolTip direction="top-right" showDelay="500">
+            		<span style="white-space:nowrap"> Click one row to show the threads tree below!<br/></span>
+            	</rich:toolTip>
+			</a4j:support>
+			</rich:dataTable>
+			
+			</h:form>
+			</rich:panel>	
+			
+			<br/>	
+			<h:outputText id="threadOutputText" value="Thread #{treeThreadBean.selectedThread} is chosen,please see the
+			threads info below!"/>	
+			
+		<rich:panel>		
+	 	 <h:form>    
+	 	 <h:form>    
+       	 <rich:tree id="threadTree" style="width:300px" switchType="ajax" stateAdvisor="#{treeDemoStateAdvisor}">
+            <rich:recursiveTreeNodesAdaptor roots="#{treeFrameBean.srcRoots}" var="item" nodes="#{item.children}">
+            </rich:recursiveTreeNodesAdaptor>
+		</rich:tree>
+    	</h:form>
+
+    	</h:form>
+		</rich:panel>	
+		
+		</ui:define>
+	</ui:composition>
+
+</html>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/loadthreadtree.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 

Deleted: branches/JBossProfiler2/src/main/www/removeClassPanel.xhtml
===================================================================
--- branches/JBossProfiler2/src/main/www/removeClassPanel.xhtml	2008-10-22 19:51:26 UTC (rev 486)
+++ branches/JBossProfiler2/src/main/www/removeClassPanel.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -1,48 +0,0 @@
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:rich="http://richfaces.org/rich"
-            xmlns:a4j="http://richfaces.org/a4j"
-      xmlns:ui="http://java.sun.com/jsf/facelets">
-	
-    <rich:modalPanel id="removeClassPanel" width="350" height="250" onhide="false">
-    <a4j:region id="removeClassAddRegion">
-	    <a4j:form id="removeClassForm" ajaxSubmit="true" rendered="true"> 
-	    <a4j:outputPanel layout="block">
-	    
-  		<f:facet name="controls">
-        		<h:panelGroup>
-                		<h:graphicImage value="/images/modal/close.png" style="cursor:pointer" id="hidelink2"/>
-                		<rich:componentControl for="removeClassPanel" attachTo="hidelink2" operation="hide" event="onclick"/>
-            		</h:panelGroup>
-        		</f:facet>
-				<h:panelGroup>
-				<rich:panel>
-				<f:facet name="header">
-                	<h:outputText value="Remove Class to Intercept During Runtime"/>
-        		</f:facet>
-        		
-        		<h:outputText value="Class to remove (e.g. org.jboss.*)"/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>
-        		
-				<h:inputText value="#{basicOptBean.removeClass}"/>
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<br/>			
-				<br/>
-				
-				<a4j:commandButton id="removebutton" value="Remove" action="#{basicOptBean.removeClassAction}" onclick="this.disable=true">
-					<rich:componentControl for="removeClassPanel" attachTo="removebutton" operation="hide" event="onclick"/>
-				</a4j:commandButton>
-			
-				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
-				<a4j:commandButton id="closebutton2" value="close">
-				<rich:componentControl for="removeClassPanel" attachTo="closebutton2" operation="hide" event="onclick"/>
-				</a4j:commandButton>
-				</rich:panel>
-        		</h:panelGroup>
-    </a4j:outputPanel>
-    </a4j:form>
-	</a4j:region>
-    </rich:modalPanel>
-	</ui:composition>
\ No newline at end of file

Copied: branches/JBossProfiler2/src/main/www/removeclasspanel.xhtml (from rev 486, branches/JBossProfiler2/src/main/www/removeClassPanel.xhtml)
===================================================================
--- branches/JBossProfiler2/src/main/www/removeclasspanel.xhtml	                        (rev 0)
+++ branches/JBossProfiler2/src/main/www/removeclasspanel.xhtml	2008-10-23 20:59:57 UTC (rev 487)
@@ -0,0 +1,48 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:rich="http://richfaces.org/rich"
+            xmlns:a4j="http://richfaces.org/a4j"
+      xmlns:ui="http://java.sun.com/jsf/facelets">
+	
+    <rich:modalPanel id="removeClassPanel" width="350" height="250" onhide="false">
+    <a4j:region id="removeClassAddRegion">
+	    <a4j:form id="removeClassForm" ajaxSubmit="true" rendered="true"> 
+	    <a4j:outputPanel layout="block">
+	    
+  		<f:facet name="controls">
+        		<h:panelGroup>
+                		<h:graphicImage value="/images/modal/close.png" style="cursor:pointer" id="hidelink2"/>
+                		<rich:componentControl for="removeClassPanel" attachTo="hidelink2" operation="hide" event="onclick"/>
+            		</h:panelGroup>
+        		</f:facet>
+				<h:panelGroup>
+				<rich:panel>
+				<f:facet name="header">
+                	<h:outputText value="Remove Class to Intercept During Runtime"/>
+        		</f:facet>
+        		
+        		<h:outputText value="Class to remove (e.g. org.jboss.*)"/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>
+        		
+				<h:inputText value="#{basicOptBean.removeClass}"/>
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<br/>			
+				<br/>
+				
+				<a4j:commandButton id="removebutton" value="Remove" action="#{basicOptBean.removeClassAction}" onclick="this.disable=true">
+					<rich:componentControl for="removeClassPanel" attachTo="removebutton" operation="hide" event="onclick"/>
+				</a4j:commandButton>
+			
+				<rich:spacer width="50" height="20" title="Here is a spacer..."/>
+				<a4j:commandButton id="closebutton2" value="close">
+				<rich:componentControl for="removeClassPanel" attachTo="closebutton2" operation="hide" event="onclick"/>
+				</a4j:commandButton>
+				</rich:panel>
+        		</h:panelGroup>
+    </a4j:outputPanel>
+    </a4j:form>
+	</a4j:region>
+    </rich:modalPanel>
+	</ui:composition>
\ No newline at end of file


Property changes on: branches/JBossProfiler2/src/main/www/removeclasspanel.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:mergeinfo
   + 




More information about the jboss-cvs-commits mailing list