Package org.apache.wicket.markup
Class MergedMarkup
- java.lang.Object
-
- org.apache.wicket.markup.AbstractMarkupFragment
-
- org.apache.wicket.markup.Markup
-
- org.apache.wicket.markup.MergedMarkup
-
- All Implemented Interfaces:
Iterable<MarkupElement>
,IMarkupFragment
public class MergedMarkup extends Markup
A Markup class which represents merged markup, as it is required for markup inheritance.The Markups are merged at load time. Deep markup hierarchies are supported. Multiple inheritance is not.
The markup resource file, which is associated with the markup, will be the resource of the requested markup file. The base markup resources are not.
Base Markup must have a <wicket:child/> tag at the position where the derived markup should be inserted. From the derived markup all tags in between <wicket:extend> and </wicket:extend> will be inserted.
In addition, all <wicket:head> regions are copied as well. This allows to develop completely self-contained plug & play components including javascript etc.
- Author:
- Juergen Donnerstag
-
-
Constructor Summary
Constructors Constructor Description MergedMarkup(Markup markup, Markup baseMarkup, int extendIndex)
Merge inherited and base markup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
locationAsString()
-
Methods inherited from class org.apache.wicket.markup.Markup
addMarkupElement, addMarkupElement, find, get, getMarkupResourceStream, iterator, iterator, makeImmutable, of, of, replace, size, toString, toString
-
Methods inherited from class org.apache.wicket.markup.AbstractMarkupFragment
find
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
MergedMarkup
public MergedMarkup(Markup markup, Markup baseMarkup, int extendIndex)
Merge inherited and base markup.- Parameters:
markup
- The inherited markupbaseMarkup
- The base markupextendIndex
- Index where <wicket:extend> has been found
-
-
Method Detail
-
locationAsString
public String locationAsString()
- Overrides:
locationAsString
in classMarkup
- Returns:
- The fixed location as a string, e.g. the file name or the URL. Return null to avoid caching the markup.
-
-