Author: rgoers Date: Fri Dec 10 16:09:16 2004 New Revision: 111557 URL: http://svn.apache.org/viewcvs?view=rev&rev=111557 Log: Fix bug 32645 by having PortletURLProviderImpl.toString() create a copy of itself and register the copy with the event.
Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java cocoon/trunk/status.xml Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java?view=diff&rev=111557&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java&r1=111556&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java&r2=111557 ============================================================================== --- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java (original) +++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java Fri Dec 10 16:09:16 2004 @@ -19,6 +19,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.HashMap; import javax.portlet.PortletMode; import javax.portlet.WindowState; @@ -85,6 +86,24 @@ } /** + * Copy constructor + */ + private PortletURLProviderImpl(PortletURLProviderImpl original) { + this.manager = original.manager; + this.portletWindow = original.portletWindow; + this.mode = original.mode; + this.state = original.state; + this.action = original.action; + this.secure = original.secure; + this.clearParameters = original.clearParameters; + this.generatedURL = original.generatedURL; + if (original.parameters != null) { + this.parameters = new HashMap(original.parameters.size()); + this.parameters.putAll(original.parameters); + } + } + + /** * Return the window */ public PortletWindow getPortletWindow() { @@ -163,11 +182,15 @@ } return this.parameters; } - + + public String toString() { + return new PortletURLProviderImpl(this).getURL(); + } + /* (non-Javadoc) * @see java.lang.Object#toString() */ - public String toString() { + private String getURL() { if ( this.generatedURL == null ) { final PortletWindowImpl impl = (PortletWindowImpl)this.portletWindow; final CopletLayout cl = impl.getLayout(); Modified: cocoon/trunk/status.xml Url: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?view=diff&rev=111557&p1=cocoon/trunk/status.xml&r1=111556&p2=cocoon/trunk/status.xml&r2=111557 ============================================================================== --- cocoon/trunk/status.xml (original) +++ cocoon/trunk/status.xml Fri Dec 10 16:09:16 2004 @@ -439,6 +439,9 @@ </action> </release> <release version="2.1.7" date="TBD"> + <action dev="RG" type="fix" fixes-bug="32645"> + Modified PortletURLProviderImpl.toString() to create a copy of itself and register that with the event. + </action> <action dev="AG" type="fix" fixes-bug="32083" due-to="Mark H. Butler" due-to-email="[EMAIL PROTECTED]"> Update Deli to x031104 (include over 300 vendor, operator and third party profiles) </action>