|
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.output.XmlDocument
nextapp.echo2.webrender.ServerMessage
public class ServerMessage
The outgoing XML message which synchronizes the state of the client to that of the server.
Field Summary | |
---|---|
static java.lang.String |
GROUP_ID_INIT
Constant for the "init" message part group. |
static java.lang.String |
GROUP_ID_POSTUPDATE
Constant for the "postupdate" message part group. |
static java.lang.String |
GROUP_ID_PREREMOVE
Constant for the "preremove" message part group. |
static java.lang.String |
GROUP_ID_REMOVE
Constant for the "remove" message part group. |
static java.lang.String |
GROUP_ID_UPDATE
Constant for the "update" message part group. |
static int |
LEFT_TO_RIGHT
Constant for the use with setRootLayoutDirection()
indicating a left-to-right layout direction. |
static int |
RIGHT_TO_LEFT
Constant for the use with setRootLayoutDirection()
indicating a right-to-left layout direction. |
Constructor Summary | |
---|---|
ServerMessage()
Creates a new ServerMessage . |
Method Summary | |
---|---|
void |
addLibrary(java.lang.String serviceId)
Adds a JavaScript library service to be dynamically loaded. |
org.w3c.dom.Element |
addPart(java.lang.String groupId,
java.lang.String processor)
Adds a "message-part" to the document that will be processed by the specified client-side processor object. |
org.w3c.dom.Element |
addPartGroup(java.lang.String groupId)
Adds a "group" to the document. |
org.w3c.dom.Element |
appendPartDirective(java.lang.String groupId,
java.lang.String processor,
java.lang.String directiveName)
Creates and appends a directive element beneath to a message part. |
org.w3c.dom.Element |
getItemizedDirective(java.lang.String groupId,
java.lang.String processor,
java.lang.String directiveName,
java.lang.String[] keyAttributeNames,
java.lang.String[] keyAttributeValues)
Creates or retrieves a suitable "Itemized Directive" element. |
org.w3c.dom.Element |
getPartGroup(java.lang.String groupId)
Retrieves the "message-part-group" element pertaining to a specific group. |
void |
setAsynchronousMonitorInterval(int newValue)
Sets the interval between asynchronous requests to the server to check for server-pushed updates. |
void |
setModalContextRootId(java.lang.String id)
Sets the element id of the root of the modal context. |
void |
setRootLayoutDirection(int layoutDirection)
Sets the root layout direction of the application, i.e., either LEFT_TO_RIGHT or RIGHT_TO_LEFT . |
void |
setTransactionId(long transactionId)
Sets the numeric identifier for this transaction, which will be returned in next client message. |
Methods inherited from class nextapp.echo2.webrender.output.XmlDocument |
---|
getDocument, render, setOutputProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LEFT_TO_RIGHT
setRootLayoutDirection()
indicating a left-to-right layout direction.
public static final int RIGHT_TO_LEFT
setRootLayoutDirection()
indicating a right-to-left layout direction.
public static final java.lang.String GROUP_ID_INIT
public static final java.lang.String GROUP_ID_PREREMOVE
public static final java.lang.String GROUP_ID_REMOVE
public static final java.lang.String GROUP_ID_UPDATE
public static final java.lang.String GROUP_ID_POSTUPDATE
Constructor Detail |
---|
public ServerMessage()
ServerMessage
.
Method Detail |
---|
public void addLibrary(java.lang.String serviceId)
serviceId
- the id of the service to load (the service must return
JavaScript code with content-type "text/javascript")public org.w3c.dom.Element addPartGroup(java.lang.String groupId)
groupId
- the identifier of the group
public org.w3c.dom.Element getPartGroup(java.lang.String groupId)
groupId
- the id of the group
public org.w3c.dom.Element addPart(java.lang.String groupId, java.lang.String processor)
groupId
- the id of the group to which the "message-part" element
should be addedprocessor
- the name of the client-side processor object which will
process the message part, e.g., "EchoEventUpdate", or
"EchoDomUpdate"
public org.w3c.dom.Element appendPartDirective(java.lang.String groupId, java.lang.String processor, java.lang.String directiveName)
processor
argument. If this is not
possible, a new "message-part" element is created and the directive is
added to it.
groupId
- processor
- the name of the client-side processor object which will
process the message part, e.g., "EchoEventUpdate", or
"EchoDomUpdate"directiveName
- the name of the directive, e.g., "event-add" or
"dom-remove".
public org.w3c.dom.Element getItemizedDirective(java.lang.String groupId, java.lang.String processor, java.lang.String directiveName, java.lang.String[] keyAttributeNames, java.lang.String[] keyAttributeValues)
GROUP_ID_PREREMOVE
and GROUP_ID_POSTUPDATE
groups as itemized directives will not be executed in-order, which
will cause problems if they are used for to manipulate the DOM.
groupId
- the identifier of the target message part group,
either GROUP_ID_PREREMOVE
or
GROUP_ID_POSTUPDATE
processor
- the name of the client-side processor object which will
process the message part containing the directive, e.g.,
"EchoEventUpdate", or "EchoDomUpdate"directiveName
- the name of the directive, e.g., "event-add" or
"dom-remove"keyAttributeNames
- the names of the key attributeskeyAttributeValues
- the values of the key attributes
public void setAsynchronousMonitorInterval(int newValue)
newValue
- the new interval in milliseconds (a negative value will
disable asynchronous requests)public void setModalContextRootId(java.lang.String id)
id
value of
null will disable the modal context, thus allowing ALL elements to be
enabled.
id
- the root element id of the modal contextpublic void setRootLayoutDirection(int layoutDirection)
LEFT_TO_RIGHT
or RIGHT_TO_LEFT
.
layoutDirection
- the new layout directionpublic void setTransactionId(long transactionId)
transactionId
- the transaction identifier
|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |