|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.markup.parser.AbstractMarkupFilter
org.apache.wicket.markup.parser.filter.BaseMarkupFilter
org.apache.wicket.markup.parser.filter.WicketMessageTagHandler
public final class WicketMessageTagHandler
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.
Nested Class Summary | |
---|---|
static class |
WicketMessageTagHandler.AttributeLocalizer
Attribute localizing behavior. |
Field Summary | |
---|---|
static Behavior |
ATTRIBUTE_LOCALIZER
singleton instance of WicketMessageTagHandler.AttributeLocalizer |
static String |
WICKET_MESSAGE_CONTAINER_ID
The id automatically assigned to tags with wicket:message attribute but without id |
Constructor Summary | |
---|---|
WicketMessageTagHandler()
Construct. |
Method Summary | |
---|---|
protected MarkupElement |
nextTag(ComponentTag tag)
Invoked with the next ComponentTag |
Component |
resolve(MarkupContainer container,
MarkupStream markupStream,
ComponentTag tag)
Try to resolve the tag, then create a component, add it to the container and render it. |
Methods inherited from class org.apache.wicket.markup.parser.filter.BaseMarkupFilter |
---|
nextTag |
Methods inherited from class org.apache.wicket.markup.parser.AbstractMarkupFilter |
---|
getCount, getNextFilter, nextComponentTag, setNextFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WICKET_MESSAGE_CONTAINER_ID
public static final Behavior ATTRIBUTE_LOCALIZER
WicketMessageTagHandler.AttributeLocalizer
Constructor Detail |
---|
public WicketMessageTagHandler()
Method Detail |
---|
protected final MarkupElement nextTag(ComponentTag tag) throws ParseException
BaseMarkupFilter
nextTag
in class BaseMarkupFilter
ParseException
public Component resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
IComponentResolver
resolve
in interface IComponentResolver
container
- The container parsing its markupmarkupStream
- The current markupStreamtag
- The current component tag while parsing the markup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |