| java.lang.Object nextapp.echo2.webrender.servermessage.DomUpdate
DomUpdate | public class DomUpdate (Code) | | 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.
|
Method Summary | |
public static void | renderAttributeUpdate(ServerMessage serverMessage, String targetId, String attributeName, String attributeValue) Creates a attribute-update operation to update an
element attribute of the element identified by targetId
in the client DOM. | public static 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. | public static void | renderElementAdd(ServerMessage serverMessage, String parentId, DocumentFragment htmlFragment) Creates a dom-add operation to append HTML content to the
end of the element identified by parentId . | public static void | renderElementAdd(ServerMessage serverMessage, String parentId, String siblingId, DocumentFragment htmlFragment) Creates a dom-add operation to insert HTML content in the
element identified by parentId . | public static void | renderElementAddContent(ServerMessage serverMessage, Element domAddElement, String parentId, DocumentFragment htmlFragment) Adds content to be added to an existing dom-add operation. | public static void | renderElementAddContent(ServerMessage serverMessage, Element domAddElement, String parentId, String siblingId, DocumentFragment htmlFragment) Adds content to be added to an existing dom-add operation. | public static void | renderElementRemove(ServerMessage serverMessage, String targetId) Creates a dom-remove operation to remove the HTML element
identified by targetId from the client DOM. | public static void | renderElementRemoveChildren(ServerMessage serverMessage, String targetId) Creates a dom-remove operation to remove all child elements
of the element identified by targetId from the client DOM. | public static void | renderStyleSheetAddRule(ServerMessage serverMessage, String selectorText, String style) | public static void | renderStyleSheetRemoveRule(ServerMessage serverMessage, String selectorText) | public static void | renderStyleUpdate(ServerMessage serverMessage, String targetId, String attributeName, String attributeValue) Creates a style-update operation to update a CSS style
attribute of the element identified by targetId in the
client DOM. |
renderAttributeUpdate | public static void renderAttributeUpdate(ServerMessage serverMessage, String targetId, String attributeName, String attributeValue)(Code) | | Creates a attribute-update operation to update an
element attribute of the element identified by targetId
in the client DOM.
Parameters: serverMessage - the outgoing ServerMessage Parameters: targetId - the id of the element whose attribute is to be updated Parameters: attributeName - the name of the attribute to update Parameters: attributeValue - the new value of the attribute |
renderElementAdd | public static Element renderElementAdd(ServerMessage serverMessage)(Code) | | Prepares a 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() .
Parameters: serverMessage - the ServerMessage the created dom-add Element . |
renderElementAdd | public static void renderElementAdd(ServerMessage serverMessage, String parentId, DocumentFragment htmlFragment)(Code) | | Creates a dom-add operation to append HTML content to the
end of the element identified by parentId .
Parameters: serverMessage - the outgoing ServerMessage Parameters: parentId - the id of the element the HTML code will be appended to Parameters: htmlFragment - the HTML fragment to add to the DOM |
renderElementAdd | public static void renderElementAdd(ServerMessage serverMessage, String parentId, String siblingId, DocumentFragment htmlFragment)(Code) | | Creates a dom-add operation to insert HTML content in the
element identified by parentId .
Parameters: serverMessage - the outgoing ServerMessage Parameters: parentId - the id of the element into which the HTML code will be inserted Parameters: siblingId - The id of the element which the content will be insertedbefore (this element must be an immediate childof the element specified by parentId ) Parameters: htmlFragment - the HTML fragment to add to the DOM |
renderElementAddContent | public static void renderElementAddContent(ServerMessage serverMessage, Element domAddElement, String parentId, DocumentFragment htmlFragment)(Code) | | Adds content to be added to an existing dom-add operation.
The content will be appended to the end of the DOM element identified by
parentId
Parameters: serverMessage - the ServerMessage Parameters: domAddElement - the dom-add element created by a previous invocation of renderAdd(ServerMessage) Parameters: parentId - the id of the element the HTML code will be appended to Parameters: htmlFragment - the HTML fragment to add to the DOM |
renderElementAddContent | public static void renderElementAddContent(ServerMessage serverMessage, Element domAddElement, String parentId, String siblingId, DocumentFragment htmlFragment)(Code) | | Adds content to be added to an existing dom-add operation.
The content will be inserted into the DOM element identified by
parentId before the specified siblingId .
Parameters: serverMessage - the ServerMessage Parameters: domAddElement - the dom-add element created by a previous invocation of renderAdd(ServerMessage) Parameters: parentId - the id of the element the HTML code will be appended to Parameters: siblingId - The id of the element which the content will be insertedbefore (this element must be an immediate childof the element specified by parentId ) Parameters: htmlFragment - the HTML fragment to add to the DOM |
renderElementRemove | public static void renderElementRemove(ServerMessage serverMessage, String targetId)(Code) | | Creates a dom-remove operation to remove the HTML element
identified by targetId from the client DOM.
Parameters: serverMessage - the outgoing ServerMessage Parameters: targetId - the id of the element to remove |
renderElementRemoveChildren | public static void renderElementRemoveChildren(ServerMessage serverMessage, String targetId)(Code) | | Creates a dom-remove operation to remove all child elements
of the element identified by targetId from the client DOM.
Parameters: serverMessage - the outgoing ServerMessage Parameters: targetId - the id of the element whose children ware to be removed |
renderStyleSheetAddRule | public static void renderStyleSheetAddRule(ServerMessage serverMessage, String selectorText, String style)(Code) | | Creates a stylesheet-add-rule directive to add a rule
to a stylesheet
Parameters: serverMessage - the relevant ServerMessage Parameters: selectorText - the selector of the rule to add Parameters: style - the CSS text for the style |
renderStyleSheetRemoveRule | public static void renderStyleSheetRemoveRule(ServerMessage serverMessage, String selectorText)(Code) | | Creates a stylesheet-remove-rule directive to remove a rule
from a stylesheet
Parameters: serverMessage - the relevant ServerMessage Parameters: selectorText - the selector of the rule to remove |
renderStyleUpdate | public static void renderStyleUpdate(ServerMessage serverMessage, String targetId, String attributeName, String attributeValue)(Code) | | Creates a style-update operation to update a CSS style
attribute of the element identified by targetId in the
client DOM.
Parameters: serverMessage - the outgoing ServerMessage Parameters: targetId - the id of the element whose style attribute is to be updated Parameters: attributeName - the name of the style attribute Parameters: attributeValue - the new value of the style attribute |
|
|