Author: julien(a)jboss.com
Date: 2007-09-18 11:12:03 -0400 (Tue, 18 Sep 2007)
New Revision: 8322
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/api/api.iml
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
Log:
JBPORTAL-1604: Window state required but has no effect
Modified: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/api/api.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/api/api.iml 2007-09-18
15:03:42 UTC (rev 8321)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/api/api.iml 2007-09-18
15:12:03 UTC (rev 8322)
@@ -10,6 +10,15 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library" exported="">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified:
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml 2007-09-18
15:03:42 UTC (rev 8321)
+++
branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea60/modules/core/core.iml 2007-09-18
15:12:03 UTC (rev 8322)
@@ -357,15 +357,6 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar!/"
/>
</CLASSES>
<JAVADOC />
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2007-09-18
15:03:42 UTC (rev 8321)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2007-09-18
15:12:03 UTC (rev 8322)
@@ -33,9 +33,13 @@
import
org.jboss.portal.core.model.instance.command.response.PortletInstanceActionResponse;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.NoSuchPortletException;
+import org.jboss.portal.portlet.spi.ActionContext;
import org.jboss.portal.portlet.invocation.response.RenderResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.common.FixMe;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -56,12 +60,28 @@
}
}
- public static ControllerResponse createActionResponse(PortalObjectId targetId,
PortletInvocationResponse response)
+ public static ControllerResponse createActionResponse(PortalObjectId targetId,
ActionContext actionContext, PortletInvocationResponse response)
{
if (response instanceof RenderResponse)
{
RenderResponse renderResult = (RenderResponse)response;
- return new PortletWindowActionResponse(targetId, renderResult.getWindowState(),
renderResult.getMode(), renderResult.getNavigationalState());
+
+ //
+ Mode mode = renderResult.getMode();
+ if (mode == null)
+ {
+ mode = actionContext.getMode();
+ }
+
+ //
+ WindowState windowState = renderResult.getWindowState();
+ if (windowState == null)
+ {
+ windowState = actionContext.getWindowState();
+ }
+
+ //
+ return new PortletWindowActionResponse(targetId, windowState, mode,
renderResult.getNavigationalState());
}
else
{
@@ -69,12 +89,28 @@
}
}
- public static ControllerResponse createActionResponse(String instanceId,
PortletInvocationResponse response)
+ public static ControllerResponse createActionResponse(String instanceId, ActionContext
actionContext, PortletInvocationResponse response)
{
if (response instanceof
org.jboss.portal.portlet.invocation.response.RenderResponse)
{
RenderResponse renderResult = (RenderResponse)response;
- return new PortletInstanceActionResponse(instanceId,
renderResult.getWindowState(), renderResult.getMode(),
renderResult.getNavigationalState());
+
+ //
+ Mode mode = renderResult.getMode();
+ if (mode == null)
+ {
+ mode = actionContext.getMode();
+ }
+
+ //
+ WindowState windowState = renderResult.getWindowState();
+ if (windowState == null)
+ {
+ windowState = actionContext.getWindowState();
+ }
+
+ //
+ return new PortletInstanceActionResponse(instanceId, windowState, mode,
renderResult.getNavigationalState());
}
else
{
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java 2007-09-18
15:03:42 UTC (rev 8321)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/instance/command/action/InvokePortletInstanceActionCommand.java 2007-09-18
15:12:03 UTC (rev 8322)
@@ -34,6 +34,7 @@
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.spi.ActionContext;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.Mode;
@@ -102,7 +103,7 @@
PortletInvocationResponse response = instance.invoke(action);
//
- return ControllerResponseFactory.createActionResponse(instanceId, response);
+ return ControllerResponseFactory.createActionResponse(instanceId,
(ActionContext)action.getContext(), response);
}
catch (PortletInvokerException e)
{
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2007-09-18
15:03:42 UTC (rev 8321)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2007-09-18
15:12:03 UTC (rev 8322)
@@ -39,7 +39,9 @@
import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.spi.ActionContext;
import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
/**
@@ -157,7 +159,7 @@
PortletInvocationResponse response = instance.invoke(invocation);
//
- return ControllerResponseFactory.createActionResponse(targetId, response);
+ return ControllerResponseFactory.createActionResponse(targetId,
(ActionContext)invocation.getContext(), response);
}
catch (PortletInvokerException e)
{
Show replies by date