Hi Devs, Ate,

Tracked down a problem I was experiencing last year to do with action and resource links. I have an action link that is turning into a resource link if the wicket panel is rendered from a previously clicked on resource link. Hmm, that sounds confusing.

Here's the generated correct link:
http://localhost:8080/pluto/portal//prototype/__acprototype-portal-container0x2content-admin!-598792926 |0?_wu=%2Fcontent-admin%2F%3Fwicket%3Ainterface%3D%3A1%3AjcrPanel %3AlockToCategory%3A%3AILinkListener%3A%3A

Here's the generated incorrect link:
http://localhost:8080/pluto/portal//prototype/__rsprototype-portal-container0x2content-admin!-598792926%7C0/__acprototype-portal-container0x2content-admin!-598792926%7C0?_wu=%2Fcontent-admin%2F%3Fwicket%3Ainterface%3D%3A3%3AjcrPanel%3AlockToCategory%3A%3AILinkListener%3A%3A

You can see that the incorrect link as the middle part repeated - the __ac prefixed with an extra __rs section - but apart form that they're the same. Is some state note being reset / cleared properly?
__rsprototype-portal-container0x2content-admin!-598792926%7C0/
__acprototype-portal-container0x2content-admin!-598792926%7C0

I just bumped found http://issues.apache.org/jira/browse/PLUTO-531 and wondered if it had anything to do with it?

The code in question is in the toString method (perhaps we need an 'else if' - but that's a bandage, not a root cause):
       //Append the resource window definition, if it exists.
        if (portalURL.getResourceWindow() != null){
               buffer.append("/");
               buffer.append(PREFIX).append(RESOURCE)
.append (encodeCharacters(portalURL.getResourceWindow()));
        }
        // Append the action window definition, if it exists.
        if (portalURL.getActionWindow() != null) {
                buffer.append("/");
                buffer.append(PREFIX).append(ACTION)
                                
.append(encodeCharacters(portalURL.getActionWindow()));
        }

Also perhaps in BaseURLImpl:
            if (isAction) {
                urlProvider.setAction(true);
            }
            else if (isResourceServing){
                urlProvider.setResourceServing(true);
            }
It seems that for the URL in question, both isAction and isResourceServing are true.

Apparently the URL objects in the chain here have both the action *and* resource "windows"s defined(?). This causes the double url issue.

Let me know if there's anything I can do to help clear this one up - it was one of the few problems left in December.

Is it likely this is fixed in trunk, or a newer version? I'm running on 2.0.0-SNAPSHOT from early December. I've looked at some comparisons of relevant files in trunk and it doesn't seem so.

I don't *think* this would be caused by Wicket.

Cheers,
Tony.

Reply via email to