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

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

public final class InlineEnclosureHandler
extends AbstractMarkupFilter

This is a markup inline filter. It identifies enclosures as attribute, for example: <tr wicket:enclosure="">. The <tr> tag used in the example can be replaced with any html tag that can contain child elements. If the 'child' attribute is empty it determines the wicket:id of the child component automatically by analyzing the wicket component (in this case one wicket component is allowed) in between the open and close tags. If the enclosure tag has a 'child' attribute like <tr wicket:enclosure="controllingChildId"> than more than just one wicket component inside the enclosure tags are allowed and the child component which determines the visibility of the enclosure is identified by the 'child' attribute value which must be equal to the relative child id path.

Author:
Joonas Hamalainen
See Also:
EnclosureResolver, InlineEnclosure

Constructor Summary
InlineEnclosureHandler()
          Construct.
 
Method Summary
static String getInlineEnclosureAttribute(ComponentTag tag)
           
 MarkupElement nextTag()
          Get the next MarkupElement from the parent MarkupFilter and handle it if the specific filter criteria are met.
 
Methods inherited from class org.apache.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
 

Constructor Detail

InlineEnclosureHandler

public InlineEnclosureHandler()
Construct.

Method Detail

nextTag

public final MarkupElement nextTag()
                            throws 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 remove it by asking the parent handler for the next tag.

Returns:
Return the next eligible MarkupElement
Throws:
ParseException

getInlineEnclosureAttribute

public static final String getInlineEnclosureAttribute(ComponentTag tag)
Parameters:
tag -
Returns:
The wicket:enclosure attribute or null if not found


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