IDOMElement Interface
- public interface IDOMElement
extends IDOMNode
Interface representing elements in a JSP or HTML document.
Elements have names, as well as a list of attributes. These attributes
are not children of the element, but may be found by calling either IDOMElement.getAttributes()
or IDOMElement.getAttributeNode(String)
-
All Superinterfaces
-
IDOMNode
-
All Known Subinterfaces
-
IHTMLElement, IJspAction, IJspDirective, IJspTaglibDirective
Methods from interface com.bea.ide.lang.jsp.IDOMNode |
appendChild, decodeNodeValue, encodeNodeValue, getChildCount, getChildNode, getFirstChild, getLastChild, getNodeName, getNodeValue, getOwnerDocument, getParentNode, insertAfter, insertBefore, isReadOnly, matches, nextSibling, normalize, previousSibling, reformat, removeChild, setNodeValue |
getAttribute(String) Method
public Object getAttribute(String strName)
Returns the specified attribute value. May be one of the values returned by IDOMNode.getNodeValue()
If you want the string representation of the attribute value suitable for display to the user, use
IDOMElement.getAttributeForDisplay(String)
Returns
- null if the attribute is not specified
String if the attribute has a simple value
IDOMNodeList if the attribute has a value that is an action, or a scriptlet, etc.
This node list will have two text nodes in it that correspond to the start and end quotes of the attribute, if the attribute is quoted.
getAttributeForDisplay(String) Method
public String getAttributeForDisplay(String strName)
Retrieves the value of an attribute in a form suitable for display in the property sheet
A call should be made to IDOMElement.isAttributeEditable(String) to determine whether the user can edit
this value without losing data.
getAttributeNode(String) Method
public IDOMAttribute getAttributeNode(String strName)
Returns the IDOMAttribute for the specified name. Will return null if that attribute has not been set.
getAttributes() Method
public IDOMNodeList getAttributes()
Returns the list of attributes.
This list is in the same order as the attributes appear in the text of the document.
This list will also contain IDOMTextNode objects which represent the whitespace
between the attributes.
getTagName() Method
public String getTagName()
Returns the tag name of the element.
This method is the same as IDOMNode.getNodeName().
isAttributeEditable(String) Method
public boolean isAttributeEditable(String strName)
Returns true if the value returned by getAttributeForDisplay should be able to be modified by the user.
removeAttribute(String) Method
public void removeAttribute(String strName)
Removes the specified attribute.
setAttribute(String, Object) Method
public void setAttribute(String strName,
Object oValue)
Sets the attribute value associated with the specified name.
If the attribute already exists, its value will be replaced.
setAttributeFromDisplay(String, String) Method
public void setAttributeFromDisplay(String strName,
String strValue)
throws PropertyValidationException
Sets the value of an attribute which the user typed into the property sheet.
It will parse out scriptlets and expressions as appropriate, and may throw an exception
Exceptions
-
PropertyValidationException
validateAttribute(String, String) Method
public PropertyError validateAttribute(String strName,
String strValue)
Determines if the user has typed a value which can be passed to IDOMElement.setAttributeFromDisplay(String, String) without
throwing an exception.