taylor 2004/12/03 20:43:41
Modified: components/web-content/src/java/org/apache/jetspeed/portlet
WebContentPortlet.java
Log:
fix max/restore bug on action urls
Revision Changes Path
1.8 +10 -7
jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/WebContentPortlet.java
Index: WebContentPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/WebContentPortlet.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- WebContentPortlet.java 3 Dec 2004 04:29:56 -0000 1.7
+++ WebContentPortlet.java 4 Dec 2004 04:43:41 -0000 1.8
@@ -105,6 +105,7 @@
* */
public static final String CURRENT_URL = "webcontent.url.current";
public static final String LAST_URL = "webcontent.url.last";
+ public static final String LAST_STATE = "webcontent.last.state";
public static final String CACHE = "webcontent.cache";
/** Default encoding */
@@ -251,6 +252,13 @@
}
}
+ String lastState = (String)PortletMessaging.receive(request,
LAST_STATE);
+ String newState = request.getWindowState().toString();
+ if (lastState == null || newState == null ||
!lastState.equals(newState))
+ {
+ useCache = false;
+ }
+
// Set the content type
response.setContentType("text/html");
byte[] content;
@@ -274,7 +282,7 @@
// Done just save the last URL
lastURL = sourceURL;
PortletMessaging.publish(request, LAST_URL, lastURL);
-
+ PortletMessaging.publish(request, LAST_STATE, newState);
}
public void doEdit(RenderRequest request, RenderResponse response)
throws PortletException, IOException
@@ -299,12 +307,7 @@
htmlWriter = new OutputStreamWriter(byteOutputStream,
this.defaultEncoding);
// Set the action URL in the rewriter
- WindowState ws = request.getWindowState();
PortletURL action = response.createActionURL();
- if (ws == WindowState.MAXIMIZED)
- {
- action.setWindowState(WindowState.MAXIMIZED); // shouldnt
have to do this
- }
((WebContentRewriter) rewriter).setActionURL(action);
URL baseURL = new URL(sourceAttr);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]