You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/12/11 00:56:57 UTC

DO NOT REPLY [Bug 32645] New: - PortletURLProviderImpl may associate itself with multiple links.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32645>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32645

           Summary: PortletURLProviderImpl may associate itself with
                    multiple links.
           Product: Cocoon 2
           Version: Current SVN 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: blocks
        AssignedTo: Ralph.Goers@dslextreme.com
        ReportedBy: Ralph.Goers@dslextreme.com
                CC: dev@cocoon.apache.org


The following code is an example that would not work in the Cocoon portal:

<%
PortletURL url = renderResponse.createActionURL();
url.setParameter("ACTION", "LINKS");

for (int i=0; i < links.size(); ++i)
{
    String key = (String)links.get(i);
    url.setParameter("LINK", key);
%>
    <li><a href="<%url.toString()%>"><%=key%></a>
<%
} 
%>

The portal will generate unique urls for each anchor but associate them all with
the same PortletURLProviderImpl, causing all the links to cause the same action.
 I emailed the JSR-168 JCP and got this response:

Hi Ralph,
the portlet specification does not restrict the call of the toString()
method. The javadocs of PortletURL.toString says:
"Returns the portlet URL string representation to be embedded in the
markup. "
which means the current URL with the current params are written.

Thus I think your usage of PortletURL is correct.

Regards,
    Stefan

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.