|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo2.webrender.servermessage.DomUpdate
public class DomUpdate
A utility class to add EchoDomUpdate message parts to the
ServerMessage. EchoDomUpdate message parts
are used to directly update the client DOM with HTML code generated on
the server.
| Constructor Summary | |
|---|---|
DomUpdate()
|
|
| Method Summary | |
|---|---|
static void |
renderAttributeUpdate(ServerMessage serverMessage,
java.lang.String targetId,
java.lang.String attributeName,
java.lang.String attributeValue)
Creates a attribute-update operation to update an
element attribute of the element identified by targetId
in the client DOM. |
static org.w3c.dom.Element |
renderElementAdd(ServerMessage serverMessage)
Prepares a dom-add operation by immediately appending an
empty dom-add element to the end of the
ServerMessage's 'update' group. |
static void |
renderElementAdd(ServerMessage serverMessage,
java.lang.String parentId,
org.w3c.dom.DocumentFragment htmlFragment)
Creates a dom-add operation to append HTML content to the
end of the element identified by parentId. |
static void |
renderElementAdd(ServerMessage serverMessage,
java.lang.String parentId,
java.lang.String siblingId,
org.w3c.dom.DocumentFragment htmlFragment)
Creates a dom-add operation to insert HTML content in the
element identified by parentId. |
static void |
renderElementAddContent(ServerMessage serverMessage,
org.w3c.dom.Element domAddElement,
java.lang.String parentId,
org.w3c.dom.DocumentFragment htmlFragment)
Adds content to be added to an existing dom-add operation. |
static void |
renderElementAddContent(ServerMessage serverMessage,
org.w3c.dom.Element domAddElement,
java.lang.String parentId,
java.lang.String siblingId,
org.w3c.dom.DocumentFragment htmlFragment)
Adds content to be added to an existing dom-add operation. |
static void |
renderElementRemove(ServerMessage serverMessage,
java.lang.String targetId)
Creates a dom-remove operation to remove the HTML element
identified by targetId from the client DOM. |
static void |
renderElementRemoveChildren(ServerMessage serverMessage,
java.lang.String targetId)
Creates a dom-remove operation to remove all child elements
of the element identified by targetId from the client DOM. |
static void |
renderStyleUpdate(ServerMessage serverMessage,
java.lang.String targetId,
java.lang.String attributeName,
java.lang.String attributeValue)
Creates a style-update operation to update a CSS style
attribute of the element identified by targetId in the
client DOM. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomUpdate()
| Method Detail |
|---|
public static void renderAttributeUpdate(ServerMessage serverMessage,
java.lang.String targetId,
java.lang.String attributeName,
java.lang.String attributeValue)
attribute-update operation to update an
element attribute of the element identified by targetId
in the client DOM.
serverMessage - the outgoing ServerMessagetargetId - the id of the element whose attribute is to be updatedattributeName - the name of the attribute to updateattributeValue - the new value of the attributepublic static org.w3c.dom.Element renderElementAdd(ServerMessage serverMessage)
dom-add operation by immediately appending an
empty dom-add element to the end of the
ServerMessage's 'update' group.
Content is added to the dom-add element by invoking
renderElementAddContent().
serverMessage - the ServerMessage
dom-add Element.
public static void renderElementAdd(ServerMessage serverMessage,
java.lang.String parentId,
org.w3c.dom.DocumentFragment htmlFragment)
dom-add operation to append HTML content to the
end of the element identified by parentId.
serverMessage - the outgoing ServerMessageparentId - the id of the element the HTML code will be appended tohtmlFragment - the HTML fragment to add to the DOM
deprecated use of this method can result in DOM modifications
being performed in improper order
(instead use renderElementAdd(ServerMessage) followed by
renderElementAddContent())
public static void renderElementAdd(ServerMessage serverMessage,
java.lang.String parentId,
java.lang.String siblingId,
org.w3c.dom.DocumentFragment htmlFragment)
dom-add operation to insert HTML content in the
element identified by parentId.
serverMessage - the outgoing ServerMessageparentId - the id of the element into which the HTML code will be
insertedsiblingId - The id of the element which the content will be inserted
before (this element must be an immediate child
of the element specified by parentId)htmlFragment - the HTML fragment to add to the DOM
deprecated use of this method can result in DOM modifications
being performed in improper order
(instead use renderElementAdd(ServerMessage) followed by
renderElementAddContent())
public static void renderElementAddContent(ServerMessage serverMessage,
org.w3c.dom.Element domAddElement,
java.lang.String parentId,
org.w3c.dom.DocumentFragment htmlFragment)
dom-add operation.
The content will be appended to the end of the DOM element identified by
parentId
serverMessage - the ServerMessagedomAddElement - the dom-add element created by a
previous invocation of renderAdd(ServerMessage)parentId - the id of the element the HTML code will be appended tohtmlFragment - the HTML fragment to add to the DOM
public static void renderElementAddContent(ServerMessage serverMessage,
org.w3c.dom.Element domAddElement,
java.lang.String parentId,
java.lang.String siblingId,
org.w3c.dom.DocumentFragment htmlFragment)
dom-add operation.
The content will be inserted into the DOM element identified by
parentId before the specified siblingId.
serverMessage - the ServerMessagedomAddElement - the dom-add element created by a
previous invocation of renderAdd(ServerMessage)parentId - the id of the element the HTML code will be appended tosiblingId - The id of the element which the content will be inserted
before (this element must be an immediate child
of the element specified by parentId)htmlFragment - the HTML fragment to add to the DOM
public static void renderElementRemove(ServerMessage serverMessage,
java.lang.String targetId)
dom-remove operation to remove the HTML element
identified by targetId from the client DOM.
serverMessage - the outgoing ServerMessagetargetId - the id of the element to remove
public static void renderElementRemoveChildren(ServerMessage serverMessage,
java.lang.String targetId)
dom-remove operation to remove all child elements
of the element identified by targetId from the client DOM.
serverMessage - the outgoing ServerMessagetargetId - the id of the element whose children ware to be removed
public static void renderStyleUpdate(ServerMessage serverMessage,
java.lang.String targetId,
java.lang.String attributeName,
java.lang.String attributeValue)
style-update operation to update a CSS style
attribute of the element identified by targetId in the
client DOM.
serverMessage - the outgoing ServerMessagetargetId - the id of the element whose style
attribute is to be updatedattributeName - the name of the style attributeattributeValue - the new value of the style
attribute
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||