org.apache.wicket.markup
Class TagUtils

java.lang.Object
  extended by org.apache.wicket.markup.TagUtils

public class TagUtils
extends Object

Some utils to handle tags which otherwise would bloat the Tag API.

Author:
Juergen Donnerstag

Field Summary
static IValueMap ATTRIBUTES_SEPARATORS
          A map that keeps the separators which should be used for the different HTML element attributes.
 
Constructor Summary
TagUtils()
          Constructor
 
Method Summary
static void copyAttributes(MarkupContainer component, ComponentTag tag)
          Copy attributes from e.g.
static boolean isBodyTag(ComponentTag tag)
           
static boolean isExtendTag(IMarkupFragment markup, int i)
           
static boolean isHeadTag(MarkupElement elem)
           
static boolean isWicketBodyTag(MarkupElement elem)
           
static boolean isWicketBorderTag(MarkupElement elem)
           
static boolean isWicketHeadTag(MarkupElement elem)
           
static boolean isWicketTag(IMarkupFragment markup, int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTES_SEPARATORS

public static final IValueMap ATTRIBUTES_SEPARATORS
A map that keeps the separators which should be used for the different HTML element attributes.

Constructor Detail

TagUtils

public TagUtils()
Constructor

Method Detail

isBodyTag

public static final boolean isBodyTag(ComponentTag tag)
Parameters:
tag -
Returns:
True, if tag name equals '<body ...>'

isHeadTag

public static final boolean isHeadTag(MarkupElement elem)
Parameters:
elem -
Returns:
True, if tag name equals '<head ...>'

isWicketTag

public static final boolean isWicketTag(IMarkupFragment markup,
                                        int i)
Parameters:
markup -
i -
Returns:
True if the markup element at index 'i' is a WicketTag

isExtendTag

public static final boolean isExtendTag(IMarkupFragment markup,
                                        int i)
Parameters:
markup -
i -
Returns:
True if the markup element at index 'i' is a <wicket:extend> tag

isWicketHeadTag

public static final boolean isWicketHeadTag(MarkupElement elem)
Parameters:
elem -
Returns:
True if the current markup element is a <wicket:head> tag

isWicketBodyTag

public static final boolean isWicketBodyTag(MarkupElement elem)
Parameters:
elem -
Returns:
True if the current markup element is a <wicket:body> tag

isWicketBorderTag

public static final boolean isWicketBorderTag(MarkupElement elem)
Parameters:
elem -
Returns:
True if the current markup element is a <wicket:border> tag

copyAttributes

public static void copyAttributes(MarkupContainer component,
                                  ComponentTag tag)
Copy attributes from e.g. <wicket:panel> (or border) to the "calling" tag.

Parameters:
component - the markup container which attributes will be copied
tag - the component tag where the attributes will be applied
See Also:
WICKET-2874, WICKET-3812


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.