public class UrlPathPageParametersEncoder extends Object implements IPageParametersEncoder
Encodes page parameters into Url path fragments instead of the query string like the default
PageParametersEncoder. The parameters are encoded in the following format:
/param1Name/param1Value/param2Name/param2Value.
This used to be the default way of encoding page parameters in 1.4.x applications. Newer 1.5.x+ applications use the query string, by default. This class facilitates backwards compatibility and migrations of 1.4.x application to 1.5.x+ codebase.
Example usage:
mount(new MountedMapper("/myPage", MyPage.class, new UrlPathPageParametersEncoder()));
| Constructor and Description |
|---|
UrlPathPageParametersEncoder() |
| Modifier and Type | Method and Description |
|---|---|
PageParameters |
decodePageParameters(Url url)
Decodes the given URL to
PageParameters. |
Url |
encodePageParameters(PageParameters params)
Encode the given
PageParameters instance into URL. |
public Url encodePageParameters(PageParameters params)
IPageParametersEncoderPageParameters instance into URL. The URL will be then merged with
the URL generated for IRequestHandler.encodePageParameters in interface IPageParametersEncoderparams - parameters to encodepublic PageParameters decodePageParameters(Url url)
IPageParametersEncoderPageParameters. The URL will have all
IRequestHandler specified segments/parameters stripped.decodePageParameters in interface IPageParametersEncoderurl - url to decodePageParameters instance or null if emptyCopyright © 2006–2021 Apache Software Foundation. All rights reserved.