org.apache.wicket.markup.parser.filter
Class HeadForceTagIdHandler

java.lang.Object
  extended by org.apache.wicket.markup.parser.AbstractMarkupFilter
      extended by org.apache.wicket.markup.parser.filter.BaseMarkupFilter
          extended by org.apache.wicket.markup.parser.filter.HeadForceTagIdHandler
All Implemented Interfaces:
IMarkupFilter

public class HeadForceTagIdHandler
extends BaseMarkupFilter

Handler that sets unique tag id for every inline script and style element in <wicket:head>, unless the element already has one.
This is needed to be able to detect multiple ajax header contribution. Tags that are not inline (stript with src attribute set and link with href attribute set) do not require id, because the detection is done by comparing URLs.

Tags with wicket:id are not processed. To setOutputWicketId(true) on attached component is developer's responsibility. FIXME: Really? And if so, document properly

Author:
Matej Knopp

Constructor Summary
HeadForceTagIdHandler(Class<?> markupFileClass)
          Construct.
 
Method Summary
protected  MarkupElement nextTag(ComponentTag tag)
          Invoked with the next ComponentTag
 
Methods inherited from class org.apache.wicket.markup.parser.filter.BaseMarkupFilter
nextTag
 
Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
getCount, getNextFilter, nextComponentTag, setNextFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeadForceTagIdHandler

public HeadForceTagIdHandler(Class<?> markupFileClass)
Construct.

Parameters:
markupFileClass - Used to generated the a common prefix for the id
Method Detail

nextTag

protected final MarkupElement nextTag(ComponentTag tag)
                               throws ParseException
Description copied from class: BaseMarkupFilter
Invoked with the next ComponentTag

Specified by:
nextTag in class BaseMarkupFilter
Returns:
the next tag
Throws:
ParseException


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.