Module org.apache.wicket.core
Class WicketContainerResolver
java.lang.Object
org.apache.wicket.markup.resolver.WicketContainerResolver
- All Implemented Interfaces:
Serializable
,IComponentResolver
,IClusterable
This is a tag resolver which handles <wicket:container>
Sometimes adding components in certain ways may lead to output of invalid markup. For example,
lets pretend we output table rows two at a time using a repeater. The markup would look something
like this:
<table>
<span wicket:id="repeater">
<tr><td>...</td></tr>
<tr><td>...</td></tr>
</span>
</table>
Notice that we had to attach the repeater to a component tag - in this case a span
,
but a span is not a legal tag to nest under table
. So we can rewrite the example as
following:
<table>
<wicket:container wicket:id="repeater">
<tr><td>...</td></tr>
<tr><td>...</td></tr>
</wicket:container>
</table>
The above is valid markup because wicket namespaced tags are allowed anywhere- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve
(MarkupContainer container, MarkupStream markupStream, ComponentTag tag) Try to resolve a component.
-
Field Details
-
CONTAINER
- See Also:
-
-
Constructor Details
-
WicketContainerResolver
public WicketContainerResolver()
-
-
Method Details
-
resolve
Description copied from interface:IComponentResolver
Try to resolve a component.- Specified by:
resolve
in interfaceIComponentResolver
- Parameters:
container
- The container parsing its markupmarkupStream
- The current markupStreamtag
- The current component tag while parsing the markup- Returns:
- component or
null
if not found
-