| java.lang.Object org.apache.tapestry.dom.Node org.apache.tapestry.dom.Element
Element | final public class Element extends Node (Code) | | An element that will render with a begin tag and attributes, a body, and an end tag. Also acts as
a factory for enclosed Element, Text and Comment nodes. TODO: Support for CDATA nodes. Do we need
Entity nodes?
|
asElement | Element asElement()(Code) | | All other implementations of Node return null except this one.
|
attribute | public void attribute(String name, String value)(Code) | | Adds an attribute to the element, but only if the attribute name does not already exist.
Parameters: name - the name of the attribute to add Parameters: value - the value for the attribute. A value of null is allowed, and no attribute will beadded to the element. |
element | public Element element(String name, String... namesAndValues)(Code) | | Creates and returns a new Element node as a child of this node.
Parameters: name - the name of the element to create Parameters: namesAndValues - alternating attribute names and attribute values |
find | public Element find(String path)(Code) | | Searchs for a child element with a particular name below this element. The path parameter is
a slash separated series of element names.
Parameters: path - |
forceAttributes | public void forceAttributes(String... namesAndValues)(Code) | | Forces changes to a number of attributes. The new attributes overwrite previous
values.
|
getElementById | public Element getElementById(String id)(Code) | | Tries to find an element under this element (including itself) whose id is specified.
Performs a width-first search of the document tree.
Parameters: id - the value of the id attribute of the element being looked for the element if found. null if not found. |
getParent | public Element getParent()(Code) | | Returns the containing element for this element. This will be null for the root element of a
document.
|
|
|