public class PageLocator extends Object implements IPageLocator
Modifier and Type | Field and Description |
---|---|
protected String |
derivedPathPrefix |
protected String |
relativeClassPathToWicketPage |
Constructor and Description |
---|
PageLocator() |
PageLocator(String relativeClassPathToWicketPage,
String derivedPathPrefix) |
Modifier and Type | Method and Description |
---|---|
String |
getDerivedPathPrefix()
A prefix added to the path to determine relative Folder path to the actual pages.
Example: /admin/html folder relative to WebApp root, contains the pages for some admin context pages |
String |
getRelativeClassPathToWicketPage()
Relative path to pages referred by wicket (classpath to base Page package).
|
org.apache.wicket.util.resource.IResourceStream |
locate(Class<?> clazz,
String path,
org.apache.wicket.protocol.http.WebApplication app)
If it cannot the path then return null
|
protected org.apache.wicket.util.resource.IResourceStream |
locateMarkupPath(Class<?> clazz,
javax.servlet.ServletContext sc,
String requestedPagePath)
Locate the Markup for the component
|
static String |
optimizeOnLocale(String s)
The first time the locator runs it searches through file names and suffixes Locale code and Country code (trial & error).
|
protected String relativeClassPathToWicketPage
protected String derivedPathPrefix
public PageLocator()
public PageLocator(String relativeClassPathToWicketPage, String derivedPathPrefix)
relativeClassPathToWicketPage
- as Relative path to pages referred by wicket (classpath to base Page package). Example: com/abc/adminderivedPathPrefix
- as A prefix added to the path to determine relative Folder path to the actual pages.public static final String optimizeOnLocale(String s)
s
- protected org.apache.wicket.util.resource.IResourceStream locateMarkupPath(Class<?> clazz, javax.servlet.ServletContext sc, String requestedPagePath)
clazz
- for the markup container/component (used to represents the ClassLoader loading the resource)sc
- as ServletContextrequestedPagePath
- as String (matches location version of classpath of component)IResourceStream
SiteApplication#tweakMarkupCacheStreamProvider}
public org.apache.wicket.util.resource.IResourceStream locate(Class<?> clazz, String path, org.apache.wicket.protocol.http.WebApplication app)
locate
in interface IPageLocator
clazz
- for the markup container/component (used to represents the ClassLoader loading the resource)path
- as original requestedPagePathapp
- SiteApplication#tweakMarkupCacheStreamProvider}
public String getRelativeClassPathToWicketPage()
public String getDerivedPathPrefix()
Copyright © 2018. All rights reserved.