Reputation: 181
I'm coding a wicket 1.5 application and I need to control the way url are rendered for security reason.
mountPage("xxx/yyy", Zzzz.class)
is excellent for that but I have a problem with url generated for link listener. For exemple, if I add the following link to my page:
add(new Link<Void>("link-login") {
@Override
public void onClick() {
setResponsePage(LoginPage.class);
}
});
I obtain the following generated markup:
<a wicket:id="link-login" href="./home?0-1.ILinkListener-accessMenu-link~login">Login</a>
Is there a way to configure the generated url (./home?0-1.ILinkListener-accessMenu-link~login
)? At least, I would like to remove the ~ character.
EDIT: Solved... According to wicket staff, generated href encode the wicket path using '-' as separator. If the wicket id contains a '-', it will be transform in '~' to avoid conflict. So in order to avoid it, just remove '-' from your wicket id.
Upvotes: 1
Views: 824
Reputation: 2511
By default character - is reserved as separator for components id. You can have a look here https://cwiki.apache.org/confluence/display/WICKET/Request+mapping and try to use CryptoMapper if you are concerned about security.
Upvotes: 2