I've built wicket from the trunk about Tuesday, can't remember which particular revision it was (Can't check it either now as it was at my office and I'm at home now, but AFAIR it was just after all issues for RC2 were resolved and the trunk was declared stable). I've just checked out from trunk and it seems that AbstractRequestTargetUrlCodingStrategy#appendValue(AppendingStringBuffer url, String key, String value) hasn't changed a bit. I'm setting up the test case against the trunk and will update you soon.
/dd 2009/1/30 Igor Vaynberg <[email protected]>: > what wicket version are you using and have you tried with latest from svn? > > -igor > > On Fri, Jan 30, 2009 at 6:49 AM, <[email protected]> wrote: >> Is it OK (ie "by design" as opposed to "by mistake") that the urls generated >> for the mounted pages end up with the "/"? >> >> Provided that there's a page that expects single parameter (here: >> "content")... >> public class HelpPage extends WebPage { >> public HelpPage(PageParameters p) { >> super(p); >> add(new DynamicContentPanel("contentPanel", new >> Model<String>(p.getString("content")))); >> } >> } >> >> ...and it is mounted in the Application#init() >> mount(new BookmarkablePageRequestTargetUrlCodingStrategy("help", >> HelpPage.class, null)); >> >> ...and further referred to somewhere else as: >> add(new BookmarkablePageLink("helpPage", HelpPage.class, new >> PageParameters("content=a"))); >> >> the url in the generated markup is in the following form: >> http://localhost:8080/dummy-web/help/content/a/;jsessionid=11624C6125F8DF4867E3218676D79A29 >> >> While IMHO it should read: >> http://localhost:8080/dummy-web/help/content/a;jsessionid=11624C6125F8DF4867E3218676D79A29 >> >> The page parameter for both cases is resolved correctly by the HelpPage's >> constructor, so it seems that even though there's an extra "/" at the end of >> the url it gets omitted. >> Then why bother generating it? >> >> I looked up in the sources and found that it is the >> AbstractRequestTargetUrlCodingStrategy#appendValue(AppendingStringBuffer >> url, String key, String value) that is responsible for adding an extra >> trailing "/" at the end of the generated url >> It is invoked in the loop, and possibly there's no corner case implemented >> for the last parameter to be encoded. >> >> /regz, >> Dominik Drzewiecki >> >
