public class WicketLinkTagHandler extends AbstractMarkupFilter implements IComponentResolver
An application setting is used as default value, which might be modified for specific regions. These regions are identified by <wicket:link> tags with an optional 'autolink' attribute. The default value for the attribute is true, thus enabling autolinking. An open-close <wicket:link/> tag will change the autolink status until the end of the markup document or the next <wicket:link> tag respectively. <wicket:link> regions may be nested.
Modifier and Type | Field and Description |
---|---|
static String |
AUTOLINK_ID
The id of autolink components
|
static String |
LINK |
REQUEST_COUNTER_KEY
Constructor and Description |
---|
WicketLinkTagHandler()
Construct.
|
WicketLinkTagHandler(MarkupResourceStream resourceStream) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
analyzeAutolinkCondition(ComponentTag tag)
Analyze the tag.
|
protected MarkupElement |
onComponentTag(ComponentTag tag)
Invoked when a ComponentTag was found.
|
Component |
resolve(MarkupContainer container,
MarkupStream markupStream,
ComponentTag tag)
Try to resolve a component.
|
void |
setAutomaticLinking(boolean enable)
Set the default value for autolinking
|
getMarkupResourceStream, getNextFilter, getRequestUniqueId, getWicketNamespace, getWicketNamespace, nextElement, onSpecialTag, postProcess, setNextFilter
public static final String LINK
public static final String AUTOLINK_ID
public WicketLinkTagHandler()
public WicketLinkTagHandler(MarkupResourceStream resourceStream)
public void setAutomaticLinking(boolean enable)
enable
- if true, autolinks are enabledprotected final MarkupElement onComponentTag(ComponentTag tag) throws ParseException
AbstractMarkupFilter
By default this method is also called for WicketTags.
onComponentTag
in class AbstractMarkupFilter
ParseException
protected boolean analyzeAutolinkCondition(ComponentTag tag)
Subclass analyzeAutolinkCondition() to implement you own implementation and register the new tag handler with the markup parser through Application.newMarkupParser().
tag
- The current tag being parsedpublic Component resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
IComponentResolver
resolve
in interface IComponentResolver
container
- The container parsing its markupmarkupStream
- The current markupStreamtag
- The current component tag while parsing the markupnull
if not foundCopyright © 2006–2019 Apache Software Foundation. All rights reserved.