public class CustomHomeMapper extends HomePageMapper
IRequestMapper that handles requests to the home page ('/') and appends the string
representation of the current session locale in the URL
I.e. a request to http://example.com/app will end up in http://example.com/app/en_US
AbstractBookmarkableMapper.MountPathSegment, AbstractBookmarkableMapper.UrlInfomountSegments, pageParametersEncoder, pathSegments| Constructor and Description |
|---|
CustomHomeMapper(Class<? extends IRequestablePage> pageClass)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCompatibilityScore(Request request)
If there is just one url segment (the locale?!) then return a bigger compatibility score than
HomePageMapper.getCompatibilityScore(Request) |
Url |
mapHandler(IRequestHandler requestHandler)
Sets the current session Locale as first segment in the Url.
|
IRequestHandler |
mapRequest(Request request)
Removes the leading segment if it a valid Locale
|
parseRequestbuildUrl, checkPageClass, pageMustHaveBeenCreatedBookmarkable, redirectFromHomePage, toStringcheckPageInstance, extractPageParameters, getMatchedSegmentSizes, getPageInfo, getPathSegments, isCaseSensitiveMatch, isFixedSegment, newPageParameters, processBookmarkable, processHybrid, processListener, resolveUserLocale, segmentsMatch, setCaseSensitiveMatch, setPlaceholders, urlStartsWithMountedSegmentscleanClassName, encodePageComponentInfo, getContext, getPageClass, getPageComponentInfo, removeMetaParameterencodePageParameters, extractPageParameters, getMountSegments, getOptionalPlaceholder, getPlaceholder, getPlaceholder, resolveLocale, safeSegmentGetter, urlStartsWithpublic CustomHomeMapper(Class<? extends IRequestablePage> pageClass)
pageClass - the class of the home pagepublic Url mapHandler(IRequestHandler requestHandler)
mapHandler in interface IRequestMappermapHandler in class MountedMapperMountedMapper.mapHandler(org.apache.wicket.request.IRequestHandler)public IRequestHandler mapRequest(Request request)
mapRequest in interface IRequestMappermapRequest in class AbstractBookmarkableMapperAbstractBookmarkableMapper.mapRequest(org.apache.wicket.request.Request)public int getCompatibilityScore(Request request)
HomePageMapper.getCompatibilityScore(Request)getCompatibilityScore in interface IRequestMappergetCompatibilityScore in class HomePageMapperHomePageMapper.getCompatibilityScore(org.apache.wicket.request.Request)Copyright © 2020. All rights reserved.