|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.markup.MarkupFactory
public class MarkupFactory
Markup loading essentially is an autark modul of Wicket. MarkupFactory provides all the means to change defaults.
Constructor Summary | |
---|---|
MarkupFactory()
Construct. |
Method Summary | |
---|---|
static MarkupFactory |
get()
|
IMarkupFragment |
getMarkup(MarkupContainer container,
boolean enforceReload)
Gets a fresh markup stream that contains the (immutable) markup resource for this class. |
Markup |
getMarkup(MarkupContainer container,
Class<?> clazz,
boolean enforceReload)
Gets a fresh markup stream that contains the (immutable) markup resource for this class. |
IMarkupCache |
getMarkupCache()
The markup cache also loads the markup if not yet available in the cache. |
IMarkupLoader |
getMarkupLoader()
In case there is a need to extend the default chain of MarkupLoaders |
MarkupResourceStream |
getMarkupResourceStream(MarkupContainer container,
Class<?> clazz)
Create a new markup resource stream for the container. |
protected IMarkupResourceStreamProvider |
getMarkupResourceStreamProvider(MarkupContainer container)
Get the markup resource stream provider to be used |
boolean |
hasAssociatedMarkup(MarkupContainer container)
Check if container has associated markup |
boolean |
hasMarkupCache()
return if markup cache has been initialized yet |
Markup |
loadMarkup(MarkupContainer container,
MarkupResourceStream markupResourceStream,
boolean enforceReload)
Loads markup from a resource stream. |
MarkupParser |
newMarkupParser(MarkupResourceStream resource)
Create a new markup parser. |
protected IMarkupFilter |
onAppendMarkupFilter(IMarkupFilter filter)
a) Allow subclasses to configure individual Wicket filters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MarkupFactory()
Method Detail |
---|
public static final MarkupFactory get()
public IMarkupLoader getMarkupLoader()
public MarkupParser newMarkupParser(MarkupResourceStream resource)
In case you want to add you own markup filters, than subclass the method and call
WicketMarkupParser#add(IMarkupFilter)
for your own filter on the markup parser
returned.
resource
-
protected IMarkupFilter onAppendMarkupFilter(IMarkupFilter filter)
b) Allow to replace default filter with extended one
c) Allows to disable Wicket filters via returning false
filter
-
public IMarkupCache getMarkupCache()
public boolean hasMarkupCache()
true
if markup cache was already initialized, false
otherwisepublic final IMarkupFragment getMarkup(MarkupContainer container, boolean enforceReload)
container
- The container the markup should be associated withenforceReload
- The cache will be ignored and all, including inherited markup files, will be
reloaded. Whatever is in the cache, it will be ignored
public final Markup getMarkup(MarkupContainer container, Class<?> clazz, boolean enforceReload)
container
- The container the markup should be associated withclazz
- Must be the container class or any of its super classes.enforceReload
- The cache will be ignored and all, including inherited markup files, will be
reloaded. Whatever is in the cache, it will be ignored
public final boolean hasAssociatedMarkup(MarkupContainer container)
container
- The container the markup should be associated with
protected final IMarkupResourceStreamProvider getMarkupResourceStreamProvider(MarkupContainer container)
container
- The MarkupContainer requesting the markup resource stream
public final MarkupResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> clazz)
Note: usually it will only called once, as the IResourceStream will be cached by MarkupCache.
container
- The MarkupContainer which requests to load the Markup resource streamclazz
- Either the container class or any super class
public final Markup loadMarkup(MarkupContainer container, MarkupResourceStream markupResourceStream, boolean enforceReload)
container
- The original requesting markup containermarkupResourceStream
- The markup resource stream to load. May be null.enforceReload
- The cache will be ignored and all, including inherited markup files, will be
reloaded. Whatever is in the cache, it will be ignored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |