wicket.markup.parser.filter
Class WicketLinkTagHandler

java.lang.Object
  extended bywicket.markup.parser.AbstractMarkupFilter
      extended bywicket.markup.parser.filter.WicketLinkTagHandler
All Implemented Interfaces:
IMarkupFilter

public final class WicketLinkTagHandler
extends AbstractMarkupFilter

This is a markup inline filter. It identifies xml tags which include a href attribute and which are not Wicket specific components and flags these tags (ComponentTag) as autolink enabled. A component resolver will later resolve the href and assign a BookmarkablePageLink to it (automatically).

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.

Author:
Juergen Donnerstag

Constructor Summary
WicketLinkTagHandler(IMarkupFilter parent)
          Construct.
 
Method Summary
 MarkupElement nextTag()
          Get the next MarkupElement from the parent MarkupFilter and handles it if the specific filter criteria are met.
 void setAutomaticLinking(boolean enable)
          Set the default value for autolinking
 
Methods inherited from class wicket.markup.parser.AbstractMarkupFilter
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WicketLinkTagHandler

public WicketLinkTagHandler(IMarkupFilter parent)
Construct.

Parameters:
parent - The next element in the chain.
Method Detail

setAutomaticLinking

public void setAutomaticLinking(boolean enable)
Set the default value for autolinking

Parameters:
enable - if true, autolinks are enabled

nextTag

public MarkupElement nextTag()
                      throws java.text.ParseException
Get the next MarkupElement from the parent MarkupFilter and handles it if the specific filter criteria are met. Depending on the filter, it may return the MarkupElement unchanged, modified or it remove by asking the parent handler for the next tag.

Returns:
Return the next eligible MarkupElement
Throws:
java.text.ParseException
See Also:
IMarkupFilter.nextTag()


Copyright © 2004-2005 Wicket developers. All Rights Reserved.