|
NextApp Echo2 v2.1.1 |
||||||||
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)
Deprecated. use of this method can result in DOM modifications being performed in improper order (instead use renderElementAdd(ServerMessage) followed by
renderElementAddContent() ) |
static void |
renderElementAdd(ServerMessage serverMessage,
java.lang.String parentId,
java.lang.String siblingId,
org.w3c.dom.DocumentFragment htmlFragment)
Deprecated. use of this method can result in DOM modifications being performed in improper order (instead use renderElementAdd(ServerMessage) followed by
renderElementAddContent() ) |
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 |
renderStyleSheetAddRule(ServerMessage serverMessage,
java.lang.String selectorText,
java.lang.String style)
Creates a stylesheet-add-rule directive to add a rule
to a stylesheet |
static void |
renderStyleSheetRemoveRule(ServerMessage serverMessage,
java.lang.String selectorText)
Creates a stylesheet-remove-rule directive to remove a rule
from a stylesheet |
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 ServerMessage
targetId
- 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)
renderElementAdd(ServerMessage)
followed by
renderElementAddContent()
)
dom-add
operation to append HTML content to the
end of the element identified by parentId
.
serverMessage
- the outgoing ServerMessage
parentId
- the id of the element the HTML code will be appended tohtmlFragment
- the HTML fragment to add to the DOMpublic static void renderElementAdd(ServerMessage serverMessage, java.lang.String parentId, java.lang.String siblingId, org.w3c.dom.DocumentFragment htmlFragment)
renderElementAdd(ServerMessage)
followed by
renderElementAddContent()
)
dom-add
operation to insert HTML content in the
element identified by parentId
.
serverMessage
- the outgoing ServerMessage
parentId
- 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 DOMpublic 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 ServerMessage
domAddElement
- 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 DOMpublic 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 ServerMessage
domAddElement
- 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 DOMpublic 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 ServerMessage
targetId
- the id of the element to removepublic 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 ServerMessage
targetId
- the id of the element whose children ware to be removedpublic 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 ServerMessage
targetId
- the id of the element whose style
attribute is to be updatedattributeName
- the name of the style attributeattributeValue
- the new value of the style
attributepublic static void renderStyleSheetAddRule(ServerMessage serverMessage, java.lang.String selectorText, java.lang.String style)
stylesheet-add-rule
directive to add a rule
to a stylesheet
serverMessage
- the relevant ServerMessage
selectorText
- the selector of the rule to addstyle
- the CSS text for the stylepublic static void renderStyleSheetRemoveRule(ServerMessage serverMessage, java.lang.String selectorText)
stylesheet-remove-rule
directive to remove a rule
from a stylesheet
serverMessage
- the relevant ServerMessage
selectorText
- the selector of the rule to remove
|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |