Class WicketTagIdentifier

  • All Implemented Interfaces:
    IMarkupFilter

    public final class WicketTagIdentifier
    extends AbstractMarkupFilter
    This is a markup inline filter. It identifies xml tags which have a special meaning for Wicket. There are two type of tags which have a special meaning for Wicket.

    • All tags with Wicket namespace, e.g. <wicket:remove>
    • All tags with an attribute like wicket:id="myLabel"
    Author:
    Juergen Donnerstag
    • Constructor Detail

      • WicketTagIdentifier

        public WicketTagIdentifier​(MarkupResourceStream markup)
        Construct.
        Parameters:
        markup - The markup as known by now
    • Method Detail

      • onComponentTag

        protected MarkupElement onComponentTag​(ComponentTag tag)
                                        throws ParseException
        Get the next tag from the next MarkupFilter in the chain and search for Wicket specific tags.

        Note: The xml parser - the next MarkupFilter in the chain - returns XmlTags which are a subclass of MarkupElement. The implementation of this filter will return either ComponentTag or WicketTag. Both are subclasses of MarkupElement and both maintain a reference to the XmlTag. But no XmlTag is returned.

        Specified by:
        onComponentTag in class AbstractMarkupFilter
        Returns:
        The next tag from markup to be processed. If null then no more tags are available
        Throws:
        ParseException
        See Also:
        IMarkupFilter.nextElement()
      • registerWellKnownTagName

        public static void registerWellKnownTagName​(String name)
        Register a new well known wicket tag name (e.g. panel)
        Parameters:
        name -