| java.lang.Object com.icesoft.faces.context.DOMContext
DOMContext | public class DOMContext implements java.io.Serializable(Code) | | DOMContext provides a component specific interface to the
DOM renderer
|
Method Summary | |
public static DOMContext | attachDOMContext(FacesContext facesContext, UIComponent component) | public Element | createElement(String name) Creates an element of the type specified. | public Element | createRootElement(String name)
Creates an element of the type specified. | public Text | createTextNode(String cData)
Creates a Text node given the specified string. | public void | endNode(FacesContext facesContext, UIComponent component, Node node) This method can be used as an alternative to the streamWrite method. | public static List | findChildrenWithNodeName(Element root, String nodeName) | public Node | getCursorParent() Get the position in the document where the next DOM node will be
rendererd. | public static DOMContext | getDOMContext(FacesContext facesContext, UIComponent component) Get the DOMContext associated with the component. | public Document | getDocument() | public Node | getRootNode() | public boolean | isInitialized() Determine whether this instance is initialized. | public boolean | isStreamWriting() Convenience method used by renderers to determine if Stream writing is
enabled. | public static void | removeChildren(Node parent) | public static void | removeChildrenByTagName(Element rootElement, String name) | public void | setCursorParent(Node cursorParent) | void | setIsolatedRootNode(Node rootElement) | public void | setRootNode(Node rootNode)
Set the rootNode member variable to the parameter Node. | public void | startNode(FacesContext facesContext, UIComponent component, Node node) This method can be used as an alternative to the streamWrite method. | public void | stepInto(UIComponent component) Maintain the cursor and cursor such that the next rendered component will
be rendered as a child of the parameter component. | public void | stepOver() Maintain the cursor and cursor position; step to the position where the
next sibling should be rendered. | public void | streamWrite(FacesContext facesContext, UIComponent component, Node root, Node halter) Writes the DOM subtree anchored at root to the current
ResponseWriter. | public void | streamWrite(FacesContext facesContext, UIComponent component) |
attachDOMContext | public static DOMContext attachDOMContext(FacesContext facesContext, UIComponent component)(Code) | | This method returns the DOMContext associated with the specified
component.
Parameters: facesContext - an instance of FacesContext associated withthe lifecycle Parameters: component - component associated with this DOMContext the attached DOMContext |
createElement | public Element createElement(String name)(Code) | | 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.
Parameters: name - the specified Element type to create the created element |
createRootElement | public Element createRootElement(String name)(Code) | |
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.
Set the rootNode member variable of this instance to the newly-created
Element.
Parameters: name - Element |
createTextNode | public Text createTextNode(String cData)(Code) | |
Creates a Text node given the specified string.
Parameters: cData - The data for the node. The new Text object. |
endNode | public void endNode(FacesContext facesContext, UIComponent component, Node node) throws IOException(Code) | | This method can be used as an alternative to the streamWrite method. When
using this method you must also use the startNode method.
|
getCursorParent | public Node getCursorParent()(Code) | | Get the position in the document where the next DOM node will be
rendererd.
|
getDOMContext | public static DOMContext getDOMContext(FacesContext facesContext, UIComponent component)(Code) | | Get the DOMContext associated with the component. Do not attach the
DOMContext instance to its parent element.
Parameters: facesContext - Parameters: component - the UIComponent instance whose DOMContext weare retrieving DOMContext |
getDocument | public Document getDocument()(Code) | | Retrieve the org.w3c.dom.Document instance associated with this
DOMContext
Document |
getRootNode | public Node getRootNode()(Code) | | Get the rootNode member variable.
rootNode the root node of this DOMContext instance |
isInitialized | public boolean isInitialized()(Code) | | Determine whether this instance is initialized. An initialized
instance is guaranteed to have a root node.
boolean reflecting whether this instance is initialized. |
isStreamWriting | public boolean isStreamWriting()(Code) | | Convenience method used by renderers to determine if Stream writing is
enabled.
|
removeChildren | public static void removeChildren(Node parent)(Code) | | Remove all children from Node parent
Parameters: parent - - the root node to remove |
removeChildrenByTagName | public static void removeChildrenByTagName(Element rootElement, String name)(Code) | | Removes from the root element all children with node name equal to the
nodeName parameter
Parameters: rootElement - Parameters: name - |
setCursorParent | public void setCursorParent(Node cursorParent)(Code) | | Set the position at which the next rendered node will be appended
Parameters: cursorParent - |
setIsolatedRootNode | void setIsolatedRootNode(Node rootElement)(Code) | | |
setRootNode | public void setRootNode(Node rootNode)(Code) | |
Set the rootNode member variable to the parameter Node.
Parameters: rootNode - |
startNode | public void startNode(FacesContext facesContext, UIComponent component, Node node) throws IOException(Code) | | This method can be used as an alternative to the streamWrite method. When
using this method you must also use the endNode method.
|
stepInto | public void stepInto(UIComponent component)(Code) | | Maintain the cursor and cursor such that the next rendered component will
be rendered as a child of the parameter component.
Parameters: component - |
stepOver | public void stepOver()(Code) | | Maintain the cursor and cursor position; step to the position where the
next sibling should be rendered.
|
streamWrite | public void streamWrite(FacesContext facesContext, UIComponent component, Node root, Node halter) throws IOException(Code) | | Writes the DOM subtree anchored at root to the current
ResponseWriter. Serialization is halted at the node halter
(writing only the opening tag) and will be resumed from this node on the
next call to this function.
Parameters: facesContext - current FacesContext Parameters: component - JSF component being rendered Parameters: root - node indicating subtree of DOM to eventuallyserialize Parameters: halter - node upon which to halt serialization on this pass |
streamWrite | public void streamWrite(FacesContext facesContext, UIComponent component) throws IOException(Code) | | Convenience method for streamWrite(facesContext, component,
this.rootNode, null) .
Parameters: facesContext - current FacesContext Parameters: component - JSF component being rendered |
|
|