Class EnclosureHandler
- java.lang.Object
-
- org.apache.wicket.markup.parser.AbstractMarkupFilter
-
- org.apache.wicket.markup.parser.filter.EnclosureHandler
-
- All Implemented Interfaces:
java.io.Serializable,IMarkupFilter,IComponentResolver,org.apache.wicket.util.io.IClusterable
public final class EnclosureHandler extends AbstractMarkupFilter implements IComponentResolver
This is a markup inline filter. It identifies <wicket:enclosure> tags. If the 'child' attribute is empty it determines the wicket:id of the child component automatically by analyzing the wicket component (in this case on one wicket component is allowed) in between the open and close tags. If the enclosure tag has a 'child' attribute like<wicket:enclosure child="xxx">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:
- Juergen Donnerstag
- See Also:
Enclosure, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHILD_ATTRIBUTEThe child attributestatic java.lang.StringENCLOSURE-
Fields inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
REQUEST_COUNTER_KEY
-
-
Constructor Summary
Constructors Constructor Description EnclosureHandler()Construct.EnclosureHandler(MarkupResourceStream resourceStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MarkupElementonComponentTag(ComponentTag tag)Invoked when a ComponentTag was found.Componentresolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)Try to resolve a component.-
Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
getMarkupResourceStream, getNextFilter, getRequestUniqueId, getWicketNamespace, getWicketNamespace, nextElement, onSpecialTag, postProcess, setNextFilter
-
-
-
-
Field Detail
-
ENCLOSURE
public static final java.lang.String ENCLOSURE
- See Also:
- Constant Field Values
-
CHILD_ATTRIBUTE
public static final java.lang.String CHILD_ATTRIBUTE
The child attribute- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EnclosureHandler
public EnclosureHandler()
Construct.
-
EnclosureHandler
public EnclosureHandler(MarkupResourceStream resourceStream)
-
-
Method Detail
-
onComponentTag
protected final MarkupElement onComponentTag(ComponentTag tag) throws java.text.ParseException
Description copied from class:AbstractMarkupFilterInvoked when a ComponentTag was found.By default this method is also called for WicketTags.
- Specified by:
onComponentTagin classAbstractMarkupFilter- Returns:
- Usually the same as the tag attribute
- Throws:
java.text.ParseException
-
resolve
public Component resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
Description copied from interface:IComponentResolverTry to resolve a component.- Specified by:
resolvein interfaceIComponentResolver- Parameters:
container- The container parsing its markupmarkupStream- The current markupStreamtag- The current component tag while parsing the markup- Returns:
- component or
nullif not found
-
-