Module org.apache.wicket.core
Class WicketMessageTagHandler
java.lang.Object
org.apache.wicket.markup.parser.AbstractMarkupFilter
org.apache.wicket.markup.parser.filter.WicketMessageTagHandler
- All Implemented Interfaces:
Serializable
,IMarkupFilter
,IComponentResolver
,IClusterable
public final class WicketMessageTagHandler
extends AbstractMarkupFilter
implements IComponentResolver
This is a markup inline filter and a component resolver. It identifies wicket:message attributes
and adds an attribute modifier to the component tag that can localize
wicket:message="attr-name:i18n-key,attr-name-2:i18n-key-2,..." expressions, replacing values of
attributes specified by attr-name with a localizer lookup with key i18n-key. If an attribute
being localized has a set value that value will be used as the default value for the localization
lookup. This handler also resolves and localizes raw markup with wicket:message attribute.
- Author:
- Juergen Donnerstag, Igor Vaynberg
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Attribute localizing behavior. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The id automatically assigned to tags with wicket:message attribute but without idFields inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter
REQUEST_COUNTER_KEY
-
Constructor Summary
ConstructorDescriptionConstructor for the IComponentResolver role.WicketMessageTagHandler
(MarkupResourceStream markupResourceStream) Constructor for the IMarkupFilter role. -
Method Summary
Modifier and TypeMethodDescriptionprotected final MarkupElement
Invoked when a ComponentTag was found.resolve
(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 Details
-
WICKET_MESSAGE_CONTAINER_ID
The id automatically assigned to tags with wicket:message attribute but without id- See Also:
-
-
Constructor Details
-
WicketMessageTagHandler
public WicketMessageTagHandler()Constructor for the IComponentResolver role. -
WicketMessageTagHandler
Constructor for the IMarkupFilter role.
-
-
Method Details
-
onComponentTag
Description copied from class:AbstractMarkupFilter
Invoked when a ComponentTag was found.By default this method is also called for WicketTags.
- Specified by:
onComponentTag
in classAbstractMarkupFilter
- Returns:
- Usually the same as the tag attribute
- Throws:
ParseException
-
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
-