taylor 2004/10/12 14:29:40
Modified: applications/pam/src/java/org/apache/jetspeed/portlets/profiler
ProfilerAdminPortlet.java
Added: applications/pam/src/java/org/apache/jetspeed/portlets/profiler
ProfileForm.java
Log:
example of a tree view that expands and contracts
however it still loses state if you switch to another tab
to test: go to the profiler tab
Revision Changes Path
1.2 +38 -3
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/profiler/ProfilerAdminPortlet.java
Index: ProfilerAdminPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/profiler/ProfilerAdminPortlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProfilerAdminPortlet.java 15 Sep 2004 22:48:46 -0000 1.1
+++ ProfilerAdminPortlet.java 12 Oct 2004 21:29:40 -0000 1.2
@@ -15,6 +15,18 @@
*/
package org.apache.jetspeed.portlets.profiler;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Map;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.portals.bridges.myfaces.FacesPortlet;
+
//import org.apache.portals.bridges.myfaces.FacesPortlet;
@@ -25,7 +37,30 @@
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id$
*/
-public class ProfilerAdminPortlet //extends FacesPortlet
+public class ProfilerAdminPortlet extends FacesPortlet
{
-
+
+ public void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
+ {
+ Enumeration e = request.getParameterNames();
+ while (e.hasMoreElements())
+ {
+ String key = (String)e.nextElement();
+ System.out.println("[V]key/value = " + key + ": [" +
request.getParameter(key) + "]");
+ }
+ super.doView(request, response);
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException
+ {
+ Enumeration e = request.getParameterNames();
+ while (e.hasMoreElements())
+ {
+ String key = (String)e.nextElement();
+ System.out.println("[A]key/value = " + key + ": [" +
request.getParameter(key) + "]");
+ }
+ super.processAction(request, response);
+ }
+
+
}
1.1
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/profiler/ProfileForm.java
Index: ProfileForm.java
===================================================================
/*
* Copyright 2000-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.portlets.profiler;
import java.io.Serializable;
/**
* User state.
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id: ProfileForm.java,v 1.1 2004/10/12 21:29:40 taylor Exp $
*/
public class ProfileForm
implements Serializable
{
private String name;
public ProfileForm()
{
}
public ProfileForm(String name)
{
this.name = name;
}
public void setName(String name)
{
this.name = name;
}
/**
* @return Returns the name.
*/
public String getName()
{
return name;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]