java.lang.Object
org.apache.wicket.markup.AbstractMarkupFragment
org.apache.wicket.markup.MarkupFragment
- All Implemented Interfaces:
Iterable<MarkupElement>
,IMarkupFragment
Represents a portion of a markup file, but always spans a complete tag. E.g.
open-body-close: <span>body</span> open-close: <span/> open-no-close: <input ...>body
- Author:
- Juergen Donnerstag
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IMarkupFragment
Finds a markup fragment that spans a tagfinal MarkupElement
get
(int index) Get the MarkupElement at the index provided.final MarkupResourceStream
Get the underlying markup resource stream, which might contain more than just the markup portion represented by the IMarkupFragment.final Markup
iterator()
final int
size()
The number of markup elements.toString
(boolean markupOnly) Methods inherited from class org.apache.wicket.markup.AbstractMarkupFragment
find, toString
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 Details
-
MarkupFragment
Construct.- Parameters:
markup
- The parent markup. May not be null.startIndex
- The start index of the child markup- Throws:
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= size())
-
-
Method Details
-
get
Description copied from interface:IMarkupFragment
Get the MarkupElement at the index provided.- Parameters:
index
- Index into markup list- Returns:
- Markup element
-
find
Description copied from interface:IMarkupFragment
Finds a markup fragment that spans a tag- Parameters:
id
- the wicket:id attribute in the tag- Returns:
- the markup fragment that spans the complete found tag
-
getMarkupResourceStream
Description copied from interface:IMarkupFragment
Get the underlying markup resource stream, which might contain more than just the markup portion represented by the IMarkupFragment.- Returns:
- The underlying markup resource stream
-
size
Description copied from interface:IMarkupFragment
The number of markup elements.- Returns:
- Number of markup elements
-
getRootMarkup
- Returns:
- The Markup representing the underlying markup file with all its content
-
toString
- Parameters:
markupOnly
- True if only the markup shall be returned- Returns:
- markup string
-
iterator
-