wicket
Class AutoLinkResolver

java.lang.Object
  extended bywicket.AutoLinkResolver
All Implemented Interfaces:
IComponentResolver, java.io.Serializable

public final class AutoLinkResolver
extends java.lang.Object
implements IComponentResolver

The AutoLinkResolver is responsible to handle automatic link resolution. Tags are marked "autolink" by the MarkupParser for all tags with href attribute, such as anchor and link tags with no explicit wicket id. E.g. <a href="Home.html">

If href points to a *.html file, a BookmarkablePageLink will automatically be created, except for absolut paths, where an ExternalLink is created.

If href points to a *.html file, it resolves the given URL by searching for a page class, either relative or absolute, specified by the href attribute of the tag. If relative the href URL must be relative to the package containing the associated page. An exception is thrown if no Page class was found.

If href is no *.html file a static reference to the resource is created.

Author:
Juergen Donnerstag
See Also:
WicketLinkTagHandler, Serialized Form

Constructor Summary
AutoLinkResolver()
           
 
Method Summary
 boolean resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
          Automatically creates a BookmarkablePageLink component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoLinkResolver

public AutoLinkResolver()
Method Detail

resolve

public final boolean resolve(MarkupContainer container,
                             MarkupStream markupStream,
                             ComponentTag tag)
Automatically creates a BookmarkablePageLink component.

Specified by:
resolve in interface IComponentResolver
Parameters:
markupStream - The current markupStream
tag - The current component tag while parsing the markup
container - The container parsing its markup
Returns:
true, if componentId was handle by the resolver. False, otherwise
See Also:
IComponentResolver.resolve(MarkupContainer, MarkupStream, ComponentTag)


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