Author: rgoers Date: Fri Dec 10 16:13:53 2004 New Revision: 111558 URL: http://svn.apache.org/viewcvs?view=rev&rev=111558 Log: Fix bug 32645 by having PortletURLProviderImpl.toString() create a copy of itself and register that with the event.
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java cocoon/branches/BRANCH_2_1_X/status.xml Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java?view=diff&rev=111558&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java&r1=111557&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java&r2=111558 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java Fri Dec 10 16:13:53 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/branches/BRANCH_2_1_X/status.xml Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?view=diff&rev=111558&p1=cocoon/branches/BRANCH_2_1_X/status.xml&r1=111557&p2=cocoon/branches/BRANCH_2_1_X/status.xml&r2=111558 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/status.xml (original) +++ cocoon/branches/BRANCH_2_1_X/status.xml Fri Dec 10 16:13:53 2004 @@ -202,6 +202,9 @@ <changes> <release version="@version@" date="@date@"> + <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="LG" type="add"> ContinuationsManager default implementation can now store continuations in user session. Continuations are not available outside user session and invalidated automatically