Author: rgoers Date: Sat Nov 27 22:18:57 2004 New Revision: 106790 URL: http://svn.apache.org/viewcvs?view=rev&rev=106790 Log: Portal: fix bug 32417 - define attrbiutes required for JSR-168 Portlets when running in Cocoon webapp.
Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java cocoon/trunk/status.xml Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java?view=diff&rev=106790&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java&r1=106789&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java&r2=106790 ============================================================================== --- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java (original) +++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/factory/LocalPortletInvokerImpl.java Sat Nov 27 22:18:57 2004 @@ -47,7 +47,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * - * @version CVS $Id: LocalPortletInvokerImpl.java,v 1.4 2004/03/05 13:02:14 bdelacretaz Exp $ + * @version CVS $Id$ */ public class LocalPortletInvokerImpl extends AbstractLogEnabled @@ -137,7 +137,20 @@ if ( this.portlet == null ) { throw new PortletException("Unable to instantiate portlet from class " + this.portletDefinition.getClassName()); } - this.portlet.render(request, response); + try + { + request.setAttribute(org.apache.pluto.Constants.METHOD_ID, + org.apache.pluto.Constants.METHOD_RENDER); + request.setAttribute(org.apache.pluto.Constants.PORTLET_REQUEST, request); + request.setAttribute(org.apache.pluto.Constants.PORTLET_RESPONSE, + response); + this.portlet.render(request, response); + } finally { + request.removeAttribute(org.apache.pluto.Constants.METHOD_ID); + request.removeAttribute(org.apache.pluto.Constants.PORTLET_REQUEST); + request.removeAttribute(org.apache.pluto.Constants.PORTLET_RESPONSE); + } + } /* (non-Javadoc) Modified: cocoon/trunk/status.xml Url: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?view=diff&rev=106790&p1=cocoon/trunk/status.xml&r1=106789&p2=cocoon/trunk/status.xml&r2=106790 ============================================================================== --- cocoon/trunk/status.xml (original) +++ cocoon/trunk/status.xml Sat Nov 27 22:18:57 2004 @@ -431,6 +431,10 @@ </action> </release> <release version="2.1.7" date="TBD"> + <action dev="RG" type="fix" fixes-bug="32417"> + Portal: attributes "javax.portlet.request" and "javax.portlet.response" were not set for JSR-168 + portlets running in the Cocoon webapp. + </action> <action dev="SW" type="add"> CForms: add a new "link" styling for action widgets, that renders the action as an hypertext link.