Author: julien(a)jboss.com
Date: 2007-03-30 10:15:45 -0400 (Fri, 30 Mar 2007)
New Revision: 6880
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivPortletRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivWindowRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyDecorationRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyPortletRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyRegionRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyWindowRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/render/DecorationRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java
Log:
better handling of DnD, less dirty hacks, still needs improvements on the window handling
part
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.theme.impl.render.div;
-import org.jboss.logging.Logger;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.theme.page.WindowResult;
@@ -49,24 +48,28 @@
public class DivDecorationRenderer
implements DecorationRenderer
{
- private static Logger log = Logger.getLogger(DivDecorationRenderer.class);
- /** @see DecorationRenderer#render */
- public void render(RenderContext renderContext, DecorationRenderContext drc) throws
RenderException
+ public void preRender(RenderContext renderContext, DecorationRenderContext drc)
{
- log.debug("decorate " + drc.getTitle());
-
StringBuffer markup = renderContext.getMarkupFragment();
markup.append("<tr><td
class=\"portlet-titlebar-left\"></td>");
markup.append("<td class=\"portlet-titlebar-center\">");
+ }
+
+ public void postRender(RenderContext renderContext, DecorationRenderContext drc)
+ {
+ StringBuffer markup = renderContext.getMarkupFragment();
+ markup.append("</td><td
class=\"portlet-titlebar-right\"></td></tr>");
+ }
+
+ public void render(RenderContext renderContext, DecorationRenderContext drc) throws
RenderException
+ {
+ StringBuffer markup = renderContext.getMarkupFragment();
renderTitle(renderContext, drc);
markup.append("<div class=\"portlet-mode-container\">");
renderModeAndStateLinks(renderContext, drc, WindowResult.MODES_KEY);
renderModeAndStateLinks(renderContext, drc, WindowResult.WINDOWSTATES_KEY);
-
- markup.append("</div></td><td
class=\"portlet-titlebar-right\"></td></tr>");
-
- log.debug("decoration is done");
+ markup.append("</div>");
}
private static void renderTitle(RenderContext ctx, DecorationRenderContext drc)
@@ -79,7 +82,6 @@
private static void renderModeAndStateLinks(RenderContext ctx, DecorationRenderContext
drc, String selector)
{
- log.debug("render " + selector + "s");
Collection modesOrStates = drc.getTriggerableActions(selector);
if (modesOrStates == null)
{
@@ -98,7 +100,6 @@
WindowResult.Action action = (WindowResult.Action)i.next();
if (action.isEnabled())
{
- log.debug("action is enabled: " + action.getName());
ctx.getMarkupFragment().append("<div
class=\"portlet-mode-").append(action.getName());
ctx.getMarkupFragment().append("\"
onClick=\"location.href='").append(action.getURL()).append("';\"
title=\"");
ctx.getMarkupFragment().append(action.getName()).append("\"></div>");
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivPortletRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivPortletRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivPortletRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -37,25 +37,12 @@
public class DivPortletRenderer
implements PortletRenderer
{
-
- /** @see PortletRenderer#render */
public void render(RenderContext renderContext, PortletRenderContext prc) throws
RenderException
{
- renderStart(renderContext);
- renderContext.getMarkupFragment().append(prc.getMarkup());
- renderEnd(renderContext);
+ StringBuffer out = renderContext.getMarkupFragment();
+ out.append("<tr><td
class=\"portlet-content-left\"></td>");
+ out.append("<td class=\"portlet-body\"><div
class=\"portlet-content-center\">");
+ out.append(prc.getMarkup());
+ out.append("</div></td><td
class=\"portlet-content-right\"></td></tr>");
}
-
- /** @see org.jboss.portal.theme.render.ObjectRenderer#renderStart */
- public void renderStart(RenderContext ctx)
- {
- ctx.getMarkupFragment().append("<tr><td
class=\"portlet-content-left\"></td>");
- ctx.getMarkupFragment().append("<td
class=\"portlet-body\"><div
class=\"portlet-content-center\">");
- }
-
- /** @see org.jboss.portal.theme.render.ObjectRenderer#renderEnd */
- public void renderEnd(RenderContext ctx)
- {
- ctx.getMarkupFragment().append("</div></td><td
class=\"portlet-content-right\"></td></tr>");
- }
}
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivWindowRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivWindowRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/div/DivWindowRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -22,14 +22,10 @@
******************************************************************************/
package org.jboss.portal.theme.impl.render.div;
-import org.jboss.logging.Logger;
-import org.jboss.portal.WindowState;
import org.jboss.portal.theme.render.RenderContext;
import org.jboss.portal.theme.render.RenderException;
import org.jboss.portal.theme.render.WindowRenderer;
import org.jboss.portal.theme.render.WindowRenderContext;
-import org.jboss.portal.theme.render.DecorationRenderContext;
-import org.jboss.portal.theme.render.PortletRenderContext;
/**
* Implementation of a WindowRenderer, based on div tags.
@@ -41,59 +37,16 @@
public class DivWindowRenderer
implements WindowRenderer
{
- private static Logger log = Logger.getLogger(DivWindowRenderer.class);
-
- /** @see WindowRenderer#render */
public void render(RenderContext renderContext, WindowRenderContext wrc) throws
RenderException
{
- renderStart(renderContext);
-
-// try
-// {
- DecorationRenderContext decorationRenderer = wrc.getDecoration();
- if (decorationRenderer != null)
- {
- renderContext.render(decorationRenderer);
-// decorationRenderer.render(renderContext, portletContext, result);
- }
-
- WindowState windowState = wrc.getWindowState();
- if (!WindowState.MINIMIZED.equals(windowState))
- {
- PortletRenderContext portletRenderer = wrc.getPortlet();
- if (portletRenderer != null)
- {
- renderContext.render(portletRenderer);
-// portletRenderer.render(renderContext, portletContext, result);
- }
-
- renderContext.getMarkupFragment().append("<tr><td
class=\"portlet-footer-left\"></td>");
- renderContext.getMarkupFragment().append("<td
class=\"portlet-footer-center\"></td>");
- renderContext.getMarkupFragment().append("<td
class=\"portlet-footer-right\"></td></tr>");
- }
-
-// }
-// catch (ThemeException e)
-// {
-// // the portlet state is not known (the portlet registration is gone), handle
it
-// log.error("", e);
-// // +++TODO: the error message should be configurable ...?
-// renderContext.getMarkupFragment().append("<p
class='portlet-error'><pre>").append(e).append("</pre></p>");
-// }
-
- renderEnd(renderContext);
+ StringBuffer out = renderContext.getMarkupFragment();
+ out.append("<div class=\"portlet-container\">");
+ out.append("<table width=\"100%\" border=\"0\"
cellpadding=\"0\" cellspacing=\"0\">");
+ renderContext.render(wrc.getDecoration());
+ renderContext.render(wrc.getPortlet());
+ out.append("<tr><td
class=\"portlet-footer-left\"></td>");
+ out.append("<td
class=\"portlet-footer-center\"></td>");
+ out.append("<td
class=\"portlet-footer-right\"></td></tr>");
+ out.append("</table></div>");
}
-
- /** @see
org.jboss.portal.theme.render.ObjectRenderer#renderStart(org.jboss.portal.theme.render.RenderContext)
*/
- public void renderStart(RenderContext ctx)
- {
- ctx.getMarkupFragment().append("<div
class=\"portlet-container\">");
- ctx.getMarkupFragment().append("<table width=\"100%\"
border=\"0\" cellpadding=\"0\"
cellspacing=\"0\">");
- }
-
- /** @see
org.jboss.portal.theme.render.ObjectRenderer#renderEnd(org.jboss.portal.theme.render.RenderContext)
*/
- public void renderEnd(RenderContext ctx)
- {
- ctx.getMarkupFragment().append("</table></div>");
- }
}
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -20,27 +20,14 @@
* 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.portal.theme.impl.render.dynamic;
import org.jboss.logging.Logger;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.theme.impl.render.empty.EmptyDecorationRenderer;
-import org.jboss.portal.theme.page.WindowResult;
import org.jboss.portal.theme.render.DecorationRenderer;
import org.jboss.portal.theme.render.RenderContext;
import org.jboss.portal.theme.render.RenderException;
import org.jboss.portal.theme.render.DecorationRenderContext;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
/**
* Implementation of a drag and drop decoration renderer.
*
@@ -61,128 +48,32 @@
delegate = decorationRenderer;
}
- public void render(RenderContext renderContext, DecorationRenderContext drc) throws
RenderException
+ public void preRender(RenderContext renderContext, DecorationRenderContext drc)
{
- if (DynaRegionRenderer.isEnabled())
- {
- // we don't need a title bar on empty renderers, but we want titlebar
handles on others.
- if (!(delegate instanceof EmptyDecorationRenderer))
- {
- StringBuffer markup = renderContext.getMarkupFragment();
- markup.append("<tr><td
class=\"portlet-titlebar-left\"></td>");
- markup.append("<td class=\"portlet-titlebar-center
handle\">");
- renderTitle(renderContext, drc);
- markup.append("<div
class=\"portlet-mode-container\">");
- renderModeAndStateLinks(renderContext, drc, WindowResult.MODES_KEY);
- renderModeAndStateLinks(renderContext, drc, WindowResult.WINDOWSTATES_KEY);
-
- boolean removeFeatureEnabled = false;
- if (removeFeatureEnabled)
- {
- renderRemoveLink(renderContext, drc);
- }
-
- markup.append("</div></td><td
class=\"portlet-titlebar-right\"></td></tr>");
- }
- }
- else
- {
- delegate.render(renderContext, drc);
- }
+ delegate.preRender(renderContext, drc);
}
- private static void renderRemoveLink(RenderContext renderContext,
DecorationRenderContext drc)
+ public void postRender(RenderContext renderContext, DecorationRenderContext drc)
{
- renderContext.getMarkupFragment().append("<div
class=\"portlet-mode-").append("remove");
- renderContext.getMarkupFragment().append("\"
onclick=\"removeWindow('").append(drc.getId()).append("');\"
title=\"");
-
renderContext.getMarkupFragment().append("Remove").append("\"></div>");
+ delegate.postRender(renderContext, drc);
}
- private static void renderTitle(RenderContext ctx, DecorationRenderContext drc)
+ public void render(RenderContext renderContext, DecorationRenderContext drc) throws
RenderException
{
- ctx.getMarkupFragment().append("<div
class=\"portlet-titlebar-decoration\">");
- ctx.getMarkupFragment().append("<span
class=\"portlet-titlebar-title\">");
- ctx.getMarkupFragment().append(drc.getTitle());
- ctx.getMarkupFragment().append("</span></div>");
- }
-
- private static void renderModeAndStateLinks(RenderContext ctx, DecorationRenderContext
drc, String selector)
- {
- log.debug("render " + selector + "s");
- Collection modesOrStates = drc.getTriggerableActions(selector);
- if (modesOrStates == null)
+ if (DynaRegionRenderer.isEnabled())
{
- return;
- }
+ //
+ DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
- if (modesOrStates instanceof List)
- {
- List list = (List)modesOrStates;
- Collections.sort(list, COMPARATOR);
- modesOrStates = list;
+ //
+ StringBuffer markup = renderContext.getMarkupFragment();
+ markup.append("<div class=\"handle\">");
+ delegate.render(renderContext, drc);
+ markup.append("</div>");
}
-
- for (Iterator i = modesOrStates.iterator(); i.hasNext();)
+ else
{
- WindowResult.Action action = (WindowResult.Action)i.next();
- if (action.isEnabled())
- {
- log.debug("action is enabled: " + action.getName());
- ctx.getMarkupFragment().append("<div
class=\"portlet-mode-").append(action.getName());
- ctx.getMarkupFragment().append("\"
onClick=\"location.href='").append(action.getURL()).append("';\"
title=\"");
-
ctx.getMarkupFragment().append(action.getName()).append("\"></div>");
- }
+ delegate.render(renderContext, drc);
}
}
-
- private static final Comparator COMPARATOR = new ModeAndStateComparator();
-
- private static class ModeAndStateComparator implements Comparator
- {
- private static final Map modeOrState2Index = new HashMap();
-
- static
- {
- modeOrState2Index.put(Mode.EDIT, new Integer(98));
- modeOrState2Index.put(Mode.HELP, new Integer(99));
- modeOrState2Index.put(Mode.VIEW, new Integer(100));
- modeOrState2Index.put(WindowState.MINIMIZED, new Integer(198));
- modeOrState2Index.put(WindowState.NORMAL, new Integer(199));
- modeOrState2Index.put(WindowState.MAXIMIZED, new Integer(200));
- }
-
- private static int lastModeIndex = 1;
- private static int lastStateIndex = 101;
-
- public int compare(Object o1, Object o2)
- {
- WindowResult.Action action1 = (WindowResult.Action)o1;
- WindowResult.Action action2 = (WindowResult.Action)o2;
-
- Object origin1 = action1.getOrigin();
- Object origin2 = action2.getOrigin();
-
- if (origin1.equals(origin2))
- {
- return 0;
- }
-
- int index1 = getIndexFor(origin1);
- int index2 = getIndexFor(origin2);
-
- return index1 - index2;
- }
-
- private int getIndexFor(Object origin)
- {
- Integer index = (Integer)modeOrState2Index.get(origin);
- if (index == null)
- {
- index = (origin instanceof Mode) ? new Integer(lastModeIndex++) : new
Integer(lastStateIndex++);
- modeOrState2Index.put(origin, index);
- }
- return index.intValue();
- }
- }
-
}
\ No newline at end of file
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -54,8 +54,13 @@
{
if (DynaRegionRenderer.isEnabled())
{
- if (delegate instanceof EmptyPortletRenderer)
+ // Provide handle on content if needed
+ if (Boolean.FALSE.equals(DynaWindowRenderer.handleProvided.get()))
{
+ //
+ DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
+
+ //
renderContext.getMarkupFragment().append("<span
class=\"handle\">");
delegate.render(renderContext, prc);
renderContext.getMarkupFragment().append("</span>");
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -39,10 +39,12 @@
*/
public class DynaWindowRenderer implements WindowRenderer
{
- private static Logger log = Logger.getLogger(DynaWindowRenderer.class);
+ //
private WindowRenderer delegate;
+ static final ThreadLocal handleProvided = new ThreadLocal();
+
public DynaWindowRenderer(WindowRenderer windowRenderer) throws
InstantiationException,
IllegalAccessException, ClassNotFoundException
{
@@ -55,23 +57,23 @@
{
if (DynaRegionRenderer.isEnabled())
{
- // ?????
-// int portletNumber = ((DynaRegionRenderer)renderContext
-// .getRegionRenderer()).getPortletNumber(renderContext
-// .getRegionId());
-//
-// ((DynaRegionRenderer)renderContext.getRegionRenderer()).setWindowId(
-// "portlet-dnd-" + renderContext.getRegionId() + "-"
-// + portletNumber, portletContext.getWindowName());
+ // For now we say we have no provided any handle so far for the window
+ handleProvided.set(Boolean.FALSE);
+ //
renderContext.getMarkupFragment().append("<div
id=\"").append(wrc.getId()).append("\">\n");
-
delegate.render(renderContext, wrc);
+ renderContext.getMarkupFragment().append("</div>");
- renderContext.getMarkupFragment().append("</div>");
+ //
+ handleProvided.set(null);
}
else
{
+ //
+ handleProvided.set(null);
+
+ //
delegate.render(renderContext, wrc);
}
}
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyDecorationRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyDecorationRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyDecorationRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -38,6 +38,15 @@
implements DecorationRenderer
{
+
+ public void preRender(RenderContext renderContext, DecorationRenderContext drc)
+ {
+ }
+
+ public void postRender(RenderContext renderContext, DecorationRenderContext drc)
+ {
+ }
+
public void render(RenderContext renderContext, DecorationRenderContext drc) throws
RenderException
{
}
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyPortletRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyPortletRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyPortletRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.theme.impl.render.empty;
-import org.jboss.logging.Logger;
import org.jboss.portal.theme.render.PortletRenderer;
import org.jboss.portal.theme.render.RenderContext;
import org.jboss.portal.theme.render.RenderException;
@@ -38,12 +37,8 @@
public class EmptyPortletRenderer
implements PortletRenderer
{
- private static Logger log = Logger.getLogger(EmptyPortletRenderer.class);
-
- /** @see PortletRenderer#render */
public void render(RenderContext renderContext, PortletRenderContext prc) throws
RenderException
{
-// log.debug("content of portlet: " + result.getTitle());
renderContext.getMarkupFragment().append(prc.getMarkup());
}
}
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyRegionRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyRegionRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyRegionRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -60,10 +60,9 @@
/** @see RegionRenderer#render */
public void render(RenderContext renderContext, RegionRenderContext rrc) throws
RenderException
{
- log.debug("render portlets in region : " + rrc.getId());
-
Map orderedItems = new TreeMap();
+ //
for (Iterator i = rrc.getWindowRenderContexts().iterator(); i.hasNext();)
{
WindowRenderContext window = (WindowRenderContext)i.next();
@@ -71,6 +70,7 @@
log.debug("got window to render: " + window.getId());
}
+ //
for (Iterator i = orderedItems.values().iterator(); i.hasNext();)
{
WindowRenderContext wrc = (WindowRenderContext)i.next();
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyWindowRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyWindowRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/empty/EmptyWindowRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -36,31 +36,10 @@
* @version $LastChangedRevision$, $LastChangedDate$
* @see org.jboss.portal.theme.render.WindowRenderer
*/
-public class EmptyWindowRenderer
- implements WindowRenderer
+public class EmptyWindowRenderer implements WindowRenderer
{
-// private static Logger log = Logger.getLogger(EmptyWindowRenderer.class);
-
- /** @see WindowRenderer#render */
public void render(RenderContext renderContext, WindowRenderContext wrc) throws
RenderException
{
-// log.debug("render window for portlet : " + portletContext.);
-
-// try
-// {
- WindowState windowState = wrc.getWindowState();
-// renderContext.getDecorationRenderer(result).render(renderContext, portletContext,
result);
- if (!WindowState.MINIMIZED.equals(windowState))
- {
- PortletRenderContext prc = wrc.getPortlet();
-// renderContext.getPortletRenderer(result).render(renderContext, portletContext,
result);
- renderContext.render(prc);
- }
-// }
-// catch (ThemeException e)
-// {
-// // the portlet state is not known (the portlet registration is gone), handle
it
-// e.printStackTrace(); //+++TODO
-// }
+ renderContext.render(wrc.getPortlet());
}
}
Modified: trunk/theme/src/main/org/jboss/portal/theme/render/DecorationRenderer.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/render/DecorationRenderer.java 2007-03-30
13:08:12 UTC (rev 6879)
+++ trunk/theme/src/main/org/jboss/portal/theme/render/DecorationRenderer.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -46,4 +46,9 @@
* @throws RenderException
*/
void render(RenderContext renderContext, DecorationRenderContext drc) throws
RenderException;
+
+ void preRender(RenderContext renderContext, DecorationRenderContext drc);
+
+ void postRender(RenderContext renderContext, DecorationRenderContext drc);
+
}
Modified: trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java 2007-03-30
13:08:12 UTC (rev 6879)
+++ trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java 2007-03-30
14:15:45 UTC (rev 6880)
@@ -424,7 +424,11 @@
{
DecorationRenderContext drc = (DecorationRenderContext)ctx;
DecorationRenderer renderer = getDecorationRenderer(drc);
+
+ //
+ renderer.preRender(this, drc);
renderer.render(this, drc);
+ renderer.postRender(this, drc);
}
}
finally