Class AutoLabelTextResolver
java.lang.Object
org.apache.wicket.markup.html.form.AutoLabelTextResolver
- All Implemented Interfaces:
Serializable
,IComponentResolver
,IClusterable
Resolver that provides the
<wicket:label>
tag, which will output a
FormComponent's label
without requiring a manual extra component
such as Label
or FormComponentLabel
.
<wicket:label>
can be used
- together with
<label wicket:for="...">
:<label wicket:for="myFormComponent">some other markup, optionally<wicket:label/></label>
-
standalone, with a
for
attribute:<wicket:label for="myFormComponent"/>
It also supports both input and output:
- If the FormComponent has a label model, the
<wicket:label>
tag will be replaced by the contents of that label. - If the FormComponent's label model is null, it can be picked up from
<wicket:label>
:<wicket:label>
can contain some raw markup, like this:<wicket:label>I will become the component's label!</wicket:label>
- Or it can be a message pulled from resources, similar to
<wicket:message/>
:<wicket:label key="messagekey"/>
- Author:
- Carl-Eric Menzel, igor
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolve
(MarkupContainer container, MarkupStream markupStream, ComponentTag tag) Try to resolve a component.
-
Field Details
-
LABEL
- See Also:
-
-
Constructor Details
-
AutoLabelTextResolver
public AutoLabelTextResolver()
-
-
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
-