Author: julien(a)jboss.com
Date: 2007-04-08 17:18:18 -0400 (Sun, 08 Apr 2007)
New Revision: 6961
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxInterceptor.java
trunk/theme/src/main/org/jboss/portal/test/theme/TestServlet.java
trunk/theme/src/main/org/jboss/portal/test/theme/tmp/render/TestRenderedMarkup.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaConstants.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/DynaRegionRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRenderStatus.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java
Log:
- renamed a few constants
- added minimal todo for dyna
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxInterceptor.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxInterceptor.java 2007-04-08
17:32:15 UTC (rev 6960)
+++
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxInterceptor.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -75,7 +75,7 @@
String url = serverContext.renderURL(baseServerURL,
serverContext.getURLContext(), URLFormat.newInstance(true, true));
//
- pageProps.put(DynaConstants.DYNA_RESOURCE_BASE_URL,
"/portal-ajax/dyna");
+ pageProps.put(DynaConstants.RESOURCE_BASE_URL, "/portal-ajax/dyna");
pageProps.put(DynaConstants.SERVER_BASE_URL, url);
pageProps.put(DynaConstants.VIEW_STATE, viewId);
Modified: trunk/theme/src/main/org/jboss/portal/test/theme/TestServlet.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/test/theme/TestServlet.java 2007-04-08 17:32:15
UTC (rev 6960)
+++ trunk/theme/src/main/org/jboss/portal/test/theme/TestServlet.java 2007-04-08 21:18:18
UTC (rev 6961)
@@ -138,7 +138,7 @@
//
pageRenderCtx.setLayoutState(null);
- pageRenderCtx.getPageProperties().put(DynaConstants.DYNA_RESOURCE_BASE_URL,
request.getContextPath() + "/dyna");
+ pageRenderCtx.getPageProperties().put(DynaConstants.RESOURCE_BASE_URL,
request.getContextPath() + "/dyna");
pageRenderCtx.getPageProperties().put(DynaConstants.SERVER_BASE_URL,
testContext.getServerBaseURL());
//
Modified:
trunk/theme/src/main/org/jboss/portal/test/theme/tmp/render/TestRenderedMarkup.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/test/theme/tmp/render/TestRenderedMarkup.java 2007-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/test/theme/tmp/render/TestRenderedMarkup.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -128,7 +128,7 @@
{
//
Map pageProps = new HashMap();
- pageProps.put(DynaConstants.DYNA_RESOURCE_BASE_URL, "/portal-ajax");
+ pageProps.put(DynaConstants.RESOURCE_BASE_URL, "/portal-ajax");
pageProps.put(DynaConstants.SERVER_BASE_URL,
"http://localhost:8080/portal-ajax/ajax");
//
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaConstants.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaConstants.java 2007-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaConstants.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -23,25 +23,29 @@
package org.jboss.portal.theme.impl.render.dynamic;
/**
+ * todo:
+ * 1/ dirty view state detections
+ * 2/ clarify dyna options inheritance semantics
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
public final class DynaConstants
{
- /** . */
- public static final String DYNA_RESOURCE_BASE_URL =
"theme.dyna.resource_base_url";
+ /** The base url property for the resources. */
+ public static final String RESOURCE_BASE_URL =
"theme.dyna.resource_base_url";
- /** . */
+ /** The base server URL. */
public static final String SERVER_BASE_URL = "theme.dyna.server_base_url";
/** The id for view state. */
public static final String VIEW_STATE = "theme.dyna.view_state";
/** . */
- public static final String DYNA_RENDER_OPTIONS = "dyna_render_options";
+ public static final String RENDER_OPTIONS = "dyna_render_options";
/** . */
- public static final String DYNA_RENDER_STATUS = "dyna_render_status";
+ public static final String RENDER_STATUS = "dyna_render_status";
}
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-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -52,7 +52,7 @@
public void render(RendererContext rendererContext, DecorationRendererContext drc)
throws RenderException
{
- DynaRenderOptions regionOptions =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_OPTIONS);
+ DynaRenderOptions regionOptions =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
//
PrintWriter markup = rendererContext.getWriter();
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-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -59,7 +59,7 @@
private void doDND(RendererContext rendererContext, PortletRendererContext prc) throws
RenderException
{
- DynaRenderOptions regionOptions =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_OPTIONS);
+ DynaRenderOptions regionOptions =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
//
if (regionOptions.isDnDEnabled())
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2007-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -90,7 +90,7 @@
DynaRenderOptions options = DynaRenderOptions.getOptions(dndValue,
asyncWindowValue);
//
- rendererContext.setAttribute(DynaConstants.DYNA_RENDER_OPTIONS, options);
+ rendererContext.setAttribute(DynaConstants.RENDER_OPTIONS, options);
DynaRenderStatus.set(rendererContext, true);
}
}
@@ -100,14 +100,14 @@
{
if (DynaRenderStatus.get(rendererContext))
{
- rendererContext.setAttribute(DynaConstants.DYNA_RENDER_OPTIONS, null);
+ rendererContext.setAttribute(DynaConstants.RENDER_OPTIONS, null);
}
}
public void renderHeader(RendererContext rendererContext, RegionRendererContext rrc)
throws RenderException
{
PrintWriter markup = rendererContext.getWriter();
- String jsBase = rendererContext.getProperty(DynaConstants.DYNA_RESOURCE_BASE_URL);
+ String jsBase = rendererContext.getProperty(DynaConstants.RESOURCE_BASE_URL);
String serverBaseURL = rendererContext.getProperty(DynaConstants.SERVER_BASE_URL);
String viewState = rendererContext.getProperty(DynaConstants.VIEW_STATE);
@@ -162,7 +162,7 @@
delegate.renderHeader(rendererContext, rrc);
//
- DynaRenderOptions options =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_OPTIONS);
+ DynaRenderOptions options =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
//
if (options.isDnDEnabled())
@@ -189,7 +189,7 @@
{
if (DynaRenderStatus.get(rendererContext))
{
- DynaRenderOptions options =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_OPTIONS);
+ DynaRenderOptions options =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
//
if (options.isDnDEnabled())
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRenderStatus.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRenderStatus.java 2007-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRenderStatus.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -33,19 +33,19 @@
public static boolean get(RendererContext rendererContext)
{
- Boolean status =
(Boolean)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_STATUS);
+ Boolean status =
(Boolean)rendererContext.getAttribute(DynaConstants.RENDER_STATUS);
return status == null || status.booleanValue();
}
public static boolean remove(RendererContext rendererContext)
{
- Boolean status =
(Boolean)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_STATUS);
- rendererContext.setAttribute(DynaConstants.DYNA_RENDER_STATUS, null);
+ Boolean status =
(Boolean)rendererContext.getAttribute(DynaConstants.RENDER_STATUS);
+ rendererContext.setAttribute(DynaConstants.RENDER_STATUS, null);
return status == null || status.booleanValue();
}
public static void set(RendererContext rendererContext, boolean status)
{
- rendererContext.setAttribute(DynaConstants.DYNA_RENDER_STATUS,
Boolean.valueOf(status));
+ rendererContext.setAttribute(DynaConstants.RENDER_STATUS,
Boolean.valueOf(status));
}
}
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-04-08
17:32:15 UTC (rev 6960)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -57,7 +57,7 @@
/** @see org.jboss.portal.theme.render.renderer.WindowRenderer#render */
public void render(RendererContext rendererContext, WindowRendererContext wrc) throws
RenderException
{
- DynaRenderOptions regionOptions =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.DYNA_RENDER_OPTIONS);
+ DynaRenderOptions regionOptions =
(DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
//
String dndValue = rendererContext.getProperty(DynaRenderOptions.DND_ENABLED);
Modified: trunk/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java 2007-04-08
17:32:15 UTC (rev 6960)
+++ trunk/theme/src/main/org/jboss/portal/theme/tag/ThemeTagHandler.java 2007-04-08
21:18:18 UTC (rev 6961)
@@ -86,7 +86,7 @@
PortalTheme theme = themeContext.getTheme();
//
- String jsBase = rendererContext.getProperty(DynaConstants.DYNA_RESOURCE_BASE_URL);
+ String jsBase = rendererContext.getProperty(DynaConstants.RESOURCE_BASE_URL);
out.print("<link rel=\"stylesheet\" id=\"dyna_css\"
href=\"" + jsBase + "/style.css\"
type=\"text/css\"/>\n");
// If no theme provided we use what may be on the tag