Ludovic,
You cannot commit anything for B1 as it's already been released. Please revert and
commit on trunk instead. This branch needs to be closed.
Thanks
-Vincent
-----Original Message-----
From: Ludovic Dubost [mailto:ludovic@users.forge.objectweb.org]
Sent: vendredi 22 décembre 2006 15:20
To: xwiki-commits(a)objectweb.org
Subject: [xwiki-commits] r1797 -
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web
Author: ludovic
Date: 2006-12-22 15:19:29 +0100 (Fri, 22 Dec 2006) New Revision: 1797
Modified:
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortlet.java
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortletRequest.java
Log:
XWIki-291 Improve XWikiPortletRequest in the case of BEA WebLogic
XWIki-600 Improve XWikiPortlet to add more actions
Modified:
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortlet.java
===================================================================
---
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortlet.java 2006-12-22 14:10:31 UTC (rev 1796)
+++
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortlet.java 2006-12-22 14:19:29 UTC (rev 1797)
@@ -29,7 +29,10 @@
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.XWikiException;
import com.xpn.xwiki.plugin.fileupload.FileUploadPlugin;
+import com.xpn.xwiki.plugin.charts.actions.ChartingAction;
+import com.xpn.xwiki.plugin.charts.actions.PreviewChartAction;
import com.xpn.xwiki.render.XWikiVelocityRenderer;
+import com.octo.captcha.module.struts.image.RenderImageCaptchaAction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.MDC;
@@ -263,7 +266,7 @@
if (action.equals("edit")
|| action.equals("inline"))
- form = new PrepareEditForm();
+ form = new EditForm();
else if (action.equals("preview"))
form = new EditForm();
@@ -306,9 +309,15 @@
renderResult = (new
LoginErrorAction()).render(context);
} else if (action.equals("register")) {
renderResult = (new RegisterAction()).render(context);
+ } else if (action.equals("skin")) {
+ renderResult = (new SkinAction()).render(context);
+ } else if (action.equals("export")) {
+ renderResult = (new ExportAction()).render(context);
+ } else if (action.equals("import")) {
+ renderResult = (new ImportAction()).render(context);
} else if (action.equals("portletConfig")) {
renderResult = "portletConfig";
- }
+ }
if (renderResult != null) {
String page = Utils.getPage(request, renderResult);
Utils.parseTemplate(page, context);
Modified:
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortletRequest.java
===================================================================
---
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortletRequest.java 2006-12-22 14:10:31 UTC (rev 1796)
+++
xwiki/branches/XWIKI_1_0_BETA_1/core/src/main/java/com/xpn/xwiki/web/XW
ikiPortletRequest.java 2006-12-22 14:19:29 UTC (rev 1797)
@@ -203,12 +203,26 @@
* Implemented Servlet Function for Portlets
* This will only work if the portlet implementation
* makes PortletRequest extends HttpServletRequest
+ *
+ * Modified getHttpServletRequest to work with WebLogic Portal
+ Implementation
*/
public HttpServletRequest getHttpServletRequest() {
- if (request instanceof HttpServletRequest)
- return (HttpServletRequest) getPortletRequest();
- return null;
+ HttpServletRequest req = null;
+
+ if (request instanceof HttpServletRequest) {
+ req = (HttpServletRequest)getPortletRequest();
+ }
+ else {
+ // WLP impl
+ req =
(HttpServletRequest)getPortletRequest().getAttribute("javax.servlet.req
uest");
+ }
+
+ if (req == null) {
+ throw new UnsupportedOperationException();
+ }
+
+ return req;
}
public String getPathInfo() {
___________________________________________________________________________
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface
r�volutionnaire.
http://fr.mail.yahoo.com