Bugs item #1462898, was opened at 2006-04-02 00:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1462898&group_id=119783
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Joseph Toth (weazelb0y)
Assigned to: Nobody/Anonymous (nobody)
Summary: Indexed Mounting Strategy - Creating Links
Initial Comment:
Trying to get wicket to create urls to indexed
mountable pages. Using the following mounting strategy
was a bit troublesome to get it to do what I wanted.
mount("/CategoryList", new
IndexedParamUrlCodingStrategy("/CategoryList",
CategoryList.class));
First I tried..
Link link = new Link("link") {
@Override
public void onClick() {
PageParameters
parameters = new PageParameters();
parameters.put("0",
category.getId());
setResponsePage(CategoryList.class, parameters);
}
};
Result...
http://localhost:8080/?wicket:interface=:0:categories:categories:0:link::ILinkListener
onClick redirects to
http://localhost:8080//CategoryList/1
Which doesn't work because of the double slash.
Because of possible search engine indexing problems I
wouldn't want the redirect anyway.
Then I tried...
PageParameters parameters = new
PageParameters();
parameters.put("0", categoryId);
BookmarkablePageLink link = new
BookmarkablePageLink(
"link",
CategoryList.class, parameters);
Result...
http://categorylist/1
Then I finally tried...
BookmarkablePageLink link = new
BookmarkablePageLink(
"link",
CategoryList.class) {
@Override
protected String getURL() {
return "/CategoryList/"
+ category.getId();
}
};
And it worked...result...
http://localhost:8080/CategoryList/1
I understand why the first example does what it does
(although without using wicket for a while I wouldn't
have) Regardless, I think the double slash is a bug.
I'm not sure what the second is doing, but I think it
should work.
Thanks
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1462898&group_id=119783
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop