'How to control web page using parameters separate with slash in wicket
I want to create some wicket web page where I will use slash delimeter. Main page will be:
http://some.url/team/
will display list of team (Here I just mount wicket web page to team)
but now I have no idea how to do it in wicket. Url:
http://some.url/team/id/330/
should show detail of team with id 330 and
http://some.url/team/id/330/edit/
should show edit form to edit information about this tournament
Solution 1:[1]
You can do something like this in your WebApplication
class:
mount(new MountedMapper("/team/id/${id}", TeamPage.class));
mount(new MountedMapper("/team/id/${id}/edit", TeamEdit.class));
Then in the WebPage class:
public TeamPage(PageParameters params){
String teamId = params.get("id").toString();
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | syl-oh |