org.apache.wicket.markup
Interface IMarkup


public interface IMarkup

Holds markup as a resource (the stream that the markup came from) and a list of MarkupElements (the markup itself).

Author:
Jonathan Locke, Juergen Donnerstag
See Also:
MarkupElement, ComponentTag, RawMarkup

Field Summary
static MarkupResourceData NO_MARKUP
          Placeholder that indicates no markup
 
Method Summary
 int findComponentIndex(java.lang.String path, java.lang.String id)
          Find the markup element index of the component with 'path'
 MarkupElement get(int index)
          For Wicket it would be sufficient for this method to be package protected.
 java.lang.String getEncoding()
          Gets the markup encoding.
 MarkupResourceStream getResource()
          Gets the resource that contains this markup
 java.lang.String getWicketNamespace()
          Get the wicket namespace valid for this specific markup
 java.lang.String getXmlDeclaration()
          Return the XML declaration string, in case if found in the markup.
 int size()
          For Wicket it would be sufficient for this method to be package protected.
 java.lang.String toDebugString()
           
 java.lang.String toString()
           
 

Field Detail

NO_MARKUP

static final MarkupResourceData NO_MARKUP
Placeholder that indicates no markup

Method Detail

findComponentIndex

int findComponentIndex(java.lang.String path,
                       java.lang.String id)
Find the markup element index of the component with 'path'

Parameters:
path - The component path expression
id - The component's id to search for
Returns:
-1, if not found

get

MarkupElement get(int index)
For Wicket it would be sufficient for this method to be package protected. However to allow wicket-bench easy access to the information ...

Parameters:
index - Index into markup list
Returns:
Markup element

getEncoding

java.lang.String getEncoding()
Gets the markup encoding. A markup encoding may be specified in a markup file with an XML encoding specifier of the form <?xml ... encoding="..." ?>.

Returns:
Encoding, or null if not found.

getResource

MarkupResourceStream getResource()
Gets the resource that contains this markup

Returns:
The resource where this markup came from

getWicketNamespace

java.lang.String getWicketNamespace()
Get the wicket namespace valid for this specific markup

Returns:
wicket namespace

getXmlDeclaration

java.lang.String getXmlDeclaration()
Return the XML declaration string, in case if found in the markup.

Returns:
Null, if not found.

size

int size()
For Wicket it would be sufficient for this method to be package protected. However to allow wicket-bench easy access to the information ...

Returns:
Number of markup elements

toDebugString

java.lang.String toDebugString()
Returns:
String representation of markup list

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String representation of markup list


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.