wicket.markup.parser.filter
Class HtmlProblemFinder

java.lang.Object
  extended by wicket.markup.parser.AbstractMarkupFilter
      extended by wicket.markup.parser.filter.HtmlProblemFinder
All Implemented Interfaces:
IMarkupFilter

public final class HtmlProblemFinder
extends AbstractMarkupFilter

This is a markup inline filter which by default is not added to the list of markup filter. It can be added by means of subclassing Application.newMarkupParser() like

     public class MyApplication extends Application
     {
         ...
         public IMarkupFilter[] getAdditionalMarkupHandler()
         {
             return new IMarkupFilter[] { new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION) };
         }
 
The purpose of the filter is to find possible HTML issues and to log a warning.

Author:
Juergen Donnerstag

Field Summary
static int ERR_INGORE
          Ignore the issue detected
static int ERR_LOG_ERROR
          Log an error on the issue detected
static int ERR_LOG_WARN
          Log a warning on the issue detected
static int ERR_THROW_EXCEPTION
          Throw an exception on the issue detected
 
Constructor Summary
HtmlProblemFinder(int problemEscalation)
          Construct.
 
Method Summary
 MarkupElement nextTag()
          Get the next MarkupElement from the parent MarkupFilter and handle it if the specific filter criteria are met.
 
Methods inherited from class wicket.markup.parser.AbstractMarkupFilter
getParent, nextComponentTag, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERR_INGORE

public static final int ERR_INGORE
Ignore the issue detected

See Also:
Constant Field Values

ERR_LOG_WARN

public static final int ERR_LOG_WARN
Log a warning on the issue detected

See Also:
Constant Field Values

ERR_LOG_ERROR

public static final int ERR_LOG_ERROR
Log an error on the issue detected

See Also:
Constant Field Values

ERR_THROW_EXCEPTION

public static final int ERR_THROW_EXCEPTION
Throw an exception on the issue detected

See Also:
Constant Field Values
Constructor Detail

HtmlProblemFinder

public HtmlProblemFinder(int problemEscalation)
Construct.

Parameters:
problemEscalation - How to escalate the issue found.
Method Detail

nextTag

public MarkupElement nextTag()
                      throws java.text.ParseException
Get the next MarkupElement from the parent MarkupFilter and handle 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-2007 Wicket developers. All Rights Reserved.