|
ICEfaces 1.x Compatibility Library 3.3.0 Java API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icesoft.faces.context.DOMContext
public class DOMContext
DOMContext provides a component specific interface to the DOM renderer
Constructor Summary | |
---|---|
protected |
DOMContext(org.icefaces.impl.context.DOMResponseWriter writer,
org.w3c.dom.Document document,
org.w3c.dom.Node parentElement)
|
Method Summary | |
---|---|
static DOMContext |
attachDOMContext(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
This method returns the DOMContext associated with the specified component. |
org.w3c.dom.Element |
createElement(java.lang.String name)
Creates an element of the type specified. |
org.w3c.dom.Element |
createRootElement(java.lang.String name)
Creates an element of the type specified. |
org.w3c.dom.Text |
createTextNode(java.lang.String cData)
Creates a Text node given the specified string. |
org.w3c.dom.Text |
createTextNodeUnescaped(java.lang.String cData)
Creates a Text node given the specified string. |
static java.util.List |
findChildrenWithNodeName(org.w3c.dom.Element root,
java.lang.String nodeName)
|
org.w3c.dom.Node |
getCursorParent()
Get the position in the document where the next DOM node will be rendererd. |
org.w3c.dom.Document |
getDocument()
Retrieve the org.w3c.dom.Document instance associated with this DOMContext |
static DOMContext |
getDOMContext(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Get the DOMContext associated with the component. |
static java.util.Map |
getDOMContexts(javax.faces.context.FacesContext facesContext)
|
org.w3c.dom.Node |
getRootNode()
Get the rootNode member variable. |
boolean |
isInitialized()
Determine whether this instance is initialized. |
static DOMContext |
reattachDOMContext(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
|
static void |
removeChildren(org.w3c.dom.Node parent)
Remove all children from Node parent |
static void |
removeChildrenByTagName(org.w3c.dom.Element rootElement,
java.lang.String name)
Removes from the root element all children with node name equal to the nodeName parameter |
void |
setCursorParent(org.w3c.dom.Node cursorParent)
Set the position at which the next rendered node will be appended |
void |
setRootNode(org.w3c.dom.Node rootNode)
Set the rootNode member variable to the parameter Node. |
void |
stepInto(javax.faces.component.UIComponent component)
Maintain the cursor and cursor such that the next rendered component will be rendered as a child of the parameter component. |
void |
stepOver()
Maintain the cursor and cursor position; step to the position where the next sibling should be rendered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DOMContext(org.icefaces.impl.context.DOMResponseWriter writer, org.w3c.dom.Document document, org.w3c.dom.Node parentElement)
Method Detail |
---|
public boolean isInitialized()
Determine whether this instance is initialized. An initialized instance is guaranteed to have a root node.
public static DOMContext attachDOMContext(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
This method returns the DOMContext associated with the specified component.
facesContext
- an instance of FacesContext
associated with
the lifecyclecomponent
- component associated with this DOMContext
DOMContext
public static DOMContext reattachDOMContext(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
public static java.util.Map getDOMContexts(javax.faces.context.FacesContext facesContext)
public static DOMContext getDOMContext(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
Get the DOMContext associated with the component. Do not attach the DOMContext instance to its parent element.
facesContext
- component
- the UIComponent
instance whose DOMContext we
are retrieving
DOMContext
public org.w3c.dom.Element createElement(java.lang.String name)
Creates an element of the type specified. Note that the instance
returned implements the Element
interface, so attributes can
be specified directly on the returned object.
In addition, if there
are known attributes with default values, Attr
nodes
representing them are automatically created and attached to the
element.
name
- the specified Element type to create
public org.w3c.dom.Text createTextNode(java.lang.String cData)
Text
node given the specified string.
The output is escaped.
cData
- The data for the node.
Text
object.public org.w3c.dom.Text createTextNodeUnescaped(java.lang.String cData)
Text
node given the specified string.
The output is not escaped, so the calling code must be carefully
audited to ensure that application data is not passed in directly.
cData
- The data for the node.
Text
object.public void setRootNode(org.w3c.dom.Node rootNode)
rootNode
- public org.w3c.dom.Element createRootElement(java.lang.String name)
Element
interface, so attributes can be
specified directly on the returned object. Attr
nodes
representing them are automatically created and attached to the element.
Set the rootNode member variable of this instance to the newly-created
Element.
name
-
public org.w3c.dom.Node getRootNode()
Get the rootNode member variable.
DOMContext
instancepublic void setCursorParent(org.w3c.dom.Node cursorParent)
cursorParent
- public org.w3c.dom.Node getCursorParent()
public void stepOver()
public void stepInto(javax.faces.component.UIComponent component)
component
- public org.w3c.dom.Document getDocument()
public static void removeChildren(org.w3c.dom.Node parent)
parent
- - the root node to removepublic static void removeChildrenByTagName(org.w3c.dom.Element rootElement, java.lang.String name)
rootElement
- name
- public static java.util.List findChildrenWithNodeName(org.w3c.dom.Element root, java.lang.String nodeName)
|
ICEfaces 1.x Compatibility Library 3.3.0 Java API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |