Author: wesleyhales
Date: 2008-03-21 09:58:44 -0400 (Fri, 21 Mar 2008)
New Revision: 10361
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java
Log:
event debugger portlet ui changes
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-21
10:14:06 UTC (rev 10360)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/DebuggerPortlet.java 2008-03-21
13:58:44 UTC (rev 10361)
@@ -24,6 +24,7 @@
import org.jboss.portal.portlet.portal.jsp.PageEventControllerContext;
import org.jboss.portal.portlet.portal.jsp.EventRoute;
+import org.jboss.portal.portlet.portal.jsp.PagePortletControllerContext;
import javax.portlet.GenericPortlet;
import javax.portlet.RenderRequest;
@@ -42,8 +43,8 @@
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException,
IOException
{
- PageEventControllerContext eventCC =
(PageEventControllerContext)req.getAttribute("bilto");
-
+ PagePortletControllerContext context =
(PagePortletControllerContext)req.getAttribute("bilto");
+ PageEventControllerContext eventCC = context.getEventControllerContext();
//
if (eventCC != null)
{
@@ -56,23 +57,24 @@
{
id = rand(1,1000);
writer.println("<div class=\"event\" id=\"event-"
+ id + "\">\n");
- printRoute(route, writer, id, "");
+ printRoute(route, writer, context, id, "");
writer.println("</div>\n");
}
writer.println("</div>\n");
}
}
- private void printRoute(EventRoute route, PrintWriter writer, int id, String cid)
+ private void printRoute(EventRoute route, PrintWriter
writer,PagePortletControllerContext context, int id, String cid)
{
- writer.print("<div onmouseover=\"showDetails(this,'details-"
+ id + cid + "')\" onmouseout=\"hideDetails(this,'details-" +
id + cid + "')\">" +
+ writer.print("<div onmouseover=\"showDetails(this,'details-"
+ id + cid + "')\" onmouseout=\"hideDetails(this,'details-" +
id + cid + "')\" onclick=\"new Effect.Highlight('" +
context.getPortletInfo(route.getSource()).getName() + "',
{startcolor:'#990000', endcolor:'ffffdd',queue: {position:'start',
scope: 'highlight', limit:2}});new Effect.Highlight('" +
context.getPortletInfo(route.getDestination()).getName() + "',
{startcolor:'#990000', endcolor:'ffffdd',queue: {position:'end',
scope: 'highlight', limit:2}});\" >" +
"<div class=\"event-header\">\n" +
- " <h4>" + route.getName().getLocalPart() +
"</h4>\n" +
+ " <h4>" +
context.getPortletInfo(route.getSource()).getName() + "</h4>\n" +
+ " <div>Event: " + route.getName().getLocalPart() +
"</div>\n" +
" </div>\n");
writer.print("<div class=\"event-body\">" +
- "<p><label>Source: </label>" + route.getSource() +
"<img src=\"/simple-portal/images/debug/arrow.gif\"
alt=\"\"/>");
- writer.print("<label>Destination: </label>" +
route.getDestination() + "</p>\n" +
+ "<p><label>Source: </label>" +
context.getPortletInfo(route.getSource()).getName() + "<img
src=\"/simple-portal/images/debug/arrow.gif\" alt=\"\"/>");
+ writer.print("<label>Destination: </label>" +
context.getPortletInfo(route.getDestination()).getName() + "</p>\n" +
" <div class=\"details\" id=\"details-" + id + cid
+ "\">\n" +
" <div class=\"details-frame\">\n" +
" " + route.getAcknowledgement() + "\n" +
@@ -87,7 +89,7 @@
{
id = rand(1,1000);
writer.println("<div class=\"children\">");
- printRoute(child, writer, id, "a");
+ printRoute(child, writer, context, id, "a");
writer.println("</div>");
}
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java 2008-03-21
10:14:06 UTC (rev 10360)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java 2008-03-21
13:58:44 UTC (rev 10361)
@@ -140,7 +140,7 @@
pageNavigationalState = pageUpdate.getPageNavigationalState();
//
- req.setAttribute("bilto", context.getEventControllerContext());
+ req.setAttribute("bilto", context);
// We perform a send redirect on actions
if (request instanceof PortletActionRequest && redirectAfterAction)