public class CustomHomeMapper
extends org.apache.wicket.core.request.mapper.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
| Constructor and Description |
|---|
CustomHomeMapper(Class<? extends org.apache.wicket.request.component.IRequestablePage> pageClass)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCompatibilityScore(org.apache.wicket.request.Request request)
If there is just one url segment (the locale?!) then return a bigger compatibility score than
HomePageMapper.getCompatibilityScore(Request) |
org.apache.wicket.request.Url |
mapHandler(org.apache.wicket.request.IRequestHandler requestHandler)
Sets the current session Locale as first segment in the Url.
|
org.apache.wicket.request.IRequestHandler |
mapRequest(org.apache.wicket.request.Request request)
Removes the leading segment if it a valid Locale
|
buildUrl, checkPageClass, newPageParameters, pageMustHaveBeenCreatedBookmarkable, redirectFromHomePage, toStringcheckPageInstance, extractPageParameters, getMatchedSegmentSizes, getPageInfo, getPathSegments, isCaseSensitiveMatch, isFixedSegment, processBookmarkable, processHybrid, processListener, segmentsMatch, setCaseSensitiveMatch, setPlaceholders, urlStartsWithMountedSegmentscleanClassName, encodePageComponentInfo, getContext, getPageClass, getPageComponentInfo, removeMetaParameterpublic CustomHomeMapper(Class<? extends org.apache.wicket.request.component.IRequestablePage> pageClass)
pageClass - the class of the home pagepublic org.apache.wicket.request.Url mapHandler(org.apache.wicket.request.IRequestHandler requestHandler)
mapHandler in interface org.apache.wicket.request.IRequestMappermapHandler in class org.apache.wicket.core.request.mapper.MountedMapperMountedMapper.mapHandler(org.apache.wicket.request.IRequestHandler)public org.apache.wicket.request.IRequestHandler mapRequest(org.apache.wicket.request.Request request)
mapRequest in interface org.apache.wicket.request.IRequestMappermapRequest in class org.apache.wicket.core.request.mapper.AbstractBookmarkableMapperAbstractBookmarkableMapper.mapRequest(org.apache.wicket.request.Request)public int getCompatibilityScore(org.apache.wicket.request.Request request)
HomePageMapper.getCompatibilityScore(Request)getCompatibilityScore in interface org.apache.wicket.request.IRequestMappergetCompatibilityScore in class org.apache.wicket.core.request.mapper.HomePageMapperHomePageMapper.getCompatibilityScore(org.apache.wicket.request.Request)Copyright © 2017. All rights reserved.