*/
public IRequestTarget decode(RequestParameters requestParameters)
{
final String parametersFragment = requestParameters.getPath().substring(
getMountPath().length());
final PageParameters parameters = new PageParameters(decodeParameters(parametersFragment,
requestParameters.getParameters()));
// do some extra work for checking whether this is a normal request to a
// bookmarkable page, or a request to a stateless page (in which case a
// wicket:interface parameter should be available
// the page map name can be defined already by logic done in
// WebRequestCodingStrategy.decode(),
// but it could also be done by the decodeParameters() call
// So we always remove the pagemap parameter just in case.
String pageMapNameEncoded = (String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
if (requestParameters.getPageMapName() == null)
{
requestParameters.setPageMapName(pageMapNameEncoded);
}
// the interface can be defined already by logic done in
// WebRequestCodingStrategy.decode(),
// but it could also be done by the decodeParameters() call
// So we always remove the interface parameter just in case.
String interfaceParameter = (String)parameters.remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME);
if (requestParameters.getInterfaceName() == null)
{
WebRequestCodingStrategy.addInterfaceParameters(interfaceParameter, requestParameters);
}