<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxSession"></a>mxSession</h1><divclass=CBody><p>Session for sharing an <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link50onMouseOver="ShowTip(event, 'tt1', 'link50')"onMouseOut="HideTip('tt1')">mxGraphModel</a> with other parties via a backend that acts as a multicaster for all changes.</p><h4class=CHeading>Diagram Sharing</h4><p>The diagram sharing is a mechanism where each atomic change of the model is encoded into XML using <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link51onMouseOver="ShowTip(event, 'tt14', 'link51')"onMouseOut="HideTip('tt14')">mxCodec</a> and then transmitted to the server by the <ahref="#mxSession.mxSession"class=LFunctionid=link52onMouseOver="ShowTip(event, 'tt8', 'link52')"onMouseOut="HideTip('tt8')">mxSession</a> object. On the server, the XML data is dispatched to each listener on the same diagram (except the sender), and the XML is decoded back into atomic changes on the client side, which are then executed on the model and stored in the command history.</p><p>The <ahref="#mxSession.significantRemoteChanges"class=LVariableid=link53onMouseOver="ShowTip(event, 'tt17', 'link53')"onMouseOut="HideTip('tt17')">mxSession.significantRemoteChanges</a> specifies how these changes are treated with respect to undo: The default value (true) will undo the last change regardless of whether it was a remote or a local change. If the switch is false, then an undo will go back until the last local change, silently undoing all remote changes up to that point. Note that these changes will be added as new remote changes to the history of the other clients.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxSession">mxSession</a></td><tdclass=SDescription>Session for sharing an <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxGraphModel</a> with other parties via a backend that acts as a multicaster for all changes.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxSession.Events">Events</a></td><tdclass=SDescription></td></tr><trclass="SEvent SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSession.mxEvent.CONNECT">mxEvent.<wbr>CONNECT</a></td><tdclass=SDescription>Fires after the session has been started, that is, after the response to the initial request was received and the session goes into polling mode. </td></tr><trclass="SEvent SIndent2"><tdclass=SEntry><ahref="#mxSession.mxEvent.SUSPEND">mxEvent.<wbr>SUSPEND</a></td><tdclass=SDescription>Fires after <ahref="#mxSession.suspend"class=LFunctionid=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">suspend</a> was called an the session was not already in suspended state. </td></tr><trclass="SEvent SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSession.mxEvent.RESUME">mxEvent.<wbr>RESUME</a></td><tdclass=SDescription>Fires after the session was resumed in <ahref="#mxSession.resume"class=LFunctionid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">resume</a>. </td></tr><trclass="SEvent SIndent2"><tdclass=SEntry><ahref="#mxSession.mxEvent.DISCONNECT">mxEvent.<wbr>DISCONNECT</a></td><tdclass=SDescription>Fires after the session was stopped in <ahref="#mxSession.stop"class=LFunctionid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">stop</a>. </td></tr><trclass="SEvent SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSession.mxEvent.NOTIFY">mxEvent.<wbr>NOTIFY</a></td><tdclass=SDescription>Fires after a notification was sent in <ahref="#mxSession.notify"class=LFunctionid=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">notify</a>. </td></tr><trclass="SEvent SIndent2"><tdclass=SEntry><ahref="#mxS
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.CONNECT"></a>mxEvent.<wbr>CONNECT</h3><divclass=CBody><p>Fires after the session has been started, that is, after the response to the initial request was received and the session goes into polling mode. This event has no properties.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.SUSPEND"></a>mxEvent.<wbr>SUSPEND</h3><divclass=CBody><p>Fires after <ahref="#mxSession.suspend"class=LFunctionid=link54onMouseOver="ShowTip(event, 'tt2', 'link54')"onMouseOut="HideTip('tt2')">suspend</a> was called an the session was not already in suspended state. This event has no properties.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.RESUME"></a>mxEvent.<wbr>RESUME</h3><divclass=CBody><p>Fires after the session was resumed in <ahref="#mxSession.resume"class=LFunctionid=link55onMouseOver="ShowTip(event, 'tt3', 'link55')"onMouseOut="HideTip('tt3')">resume</a>. This event has no properties.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.DISCONNECT"></a>mxEvent.<wbr>DISCONNECT</h3><divclass=CBody><p>Fires after the session was stopped in <ahref="#mxSession.stop"class=LFunctionid=link56onMouseOver="ShowTip(event, 'tt4', 'link56')"onMouseOut="HideTip('tt4')">stop</a>. The <code>reason</code> property contains the optional exception that was passed to the stop method.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.NOTIFY"></a>mxEvent.<wbr>NOTIFY</h3><divclass=CBody><p>Fires after a notification was sent in <ahref="#mxSession.notify"class=LFunctionid=link57onMouseOver="ShowTip(event, 'tt5', 'link57')"onMouseOut="HideTip('tt5')">notify</a>. The <code>url</code> property contains the URL and the <code>xml</code> property contains the XML data of the request.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.GET"></a>mxEvent.GET</h3><divclass=CBody><p>Fires after a response was received in <ahref="#mxSession.get"class=LFunctionid=link58onMouseOver="ShowTip(event, 'tt6', 'link58')"onMouseOut="HideTip('tt6')">get</a>. The <code>url</code> property contains the URL and the <code>request</code> is the <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link59onMouseOver="ShowTip(event, 'tt26', 'link59')"onMouseOut="HideTip('tt26')">mxXmlRequest</a> that contains the response.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.FIRED"></a>mxEvent.<wbr>FIRED</h3><divclass=CBody><p>Fires after an array of edits has been executed on the model. The <code>changes</code> property contains the array of changes.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxEvent.RECEIVE"></a>mxEvent.<wbr>RECEIVE</h3><divclass=CBody><p>Fires after an XML node was received in <ahref="#mxSession.receive"class=LFunctionid=link60onMouseOver="ShowTip(event, 'tt7', 'link60')"onMouseOut="HideTip('tt7')">receive</a>. The <code>node</code> property contains the node that was received.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.mxSession"></a>mxSession</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxSession(</td><tdclass=PParameternowrap>model,</td></tr><tr><td></td><tdclass=PParameternowrap>urlInit,</td></tr><tr><td></td><tdclass=PParameternowrap>urlPoll,</td></tr><tr><td></td><tdclass=PParameternowrap>urlNotify</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new session using the given <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link61onMouseOver="ShowTip(event, 'tt1', 'link61')"onMouseOut="HideTip('tt1')">mxGraphModel</a> and URLs to communicate with the backend.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>model</td><tdclass=CDLDescription><ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link62onMouseOver="ShowTip(event, 'tt1', 'link62')"onMouseOut="HideTip('tt1')">mxGraphModel</a> that contains the data.</td></tr><tr><tdclass=CDLEntry>urlInit</td><tdclass=CDLDescription>URL to be used for initializing the session.</td></tr><tr><tdclass=CDLEntry>urlPoll</td><tdclass=CDLDescription>URL to be used for polling the backend.</td></tr><tr><tdclass=CDLEntry>urlNotify</td><tdclass=CDLDescription>URL to be used for sending changes to the backend.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.model"></a>model</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.model</td></tr></table></blockquote><p>Reference to the enclosing <ahref="../model/mxGraphModel-js.html#mxGraphModel"class=LClassid=link63onMouseOver="ShowTip(event, 'tt1', 'link63')"onMouseOut="HideTip('tt1')">mxGraphModel</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.urlInit"></a>urlInit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.urlInit</td></tr></table></blockquote><p>URL to initialize the session.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.urlPoll"></a>urlPoll</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.urlPoll</td></tr></table></blockquote><p>URL for polling the backend.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.urlNotify"></a>urlNotify</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.urlNotify</td></tr></table></blockquote><p>URL to send changes to the backend.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.codec"></a>codec</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.codec</td></tr></table></blockquote><p>Reference to the <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link64onMouseOver="ShowTip(event, 'tt14', 'link64')"onMouseOut="HideTip('tt14')">mxCodec</a> used to encoding and decoding changes.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.linefeed"></a>linefeed</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.linefeed</td></tr></table></blockquote><p>Used for encoding linefeeds. Default is ‘&#xa;’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.escapePostData"></a>escapePostData</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.escapePostData</td></tr></table></blockquote><p>Specifies if the data in the post request sent in <ahref="#mxSession.notify"class=LFunctionid=link65onMouseOver="ShowTip(event, 'tt5', 'link65')"onMouseOut="HideTip('tt5')">notify</a> should be converted using encodeURIComponent. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.significantRemoteChanges"></a>significantRemoteChanges</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.significantRemoteChanges</td></tr></table></blockquote><p>Whether remote changes should be significant in the local command history. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.sent"></a>sent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.sent</td></tr></table></blockquote><p>Total number of sent bytes.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.received"></a>received</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.received</td></tr></table></blockquote><p>Total number of received bytes.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSession.debug"></a>debug</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.debug</td></tr></table></blockquote><p>Specifies if the session should run in debug mode. In this mode, no connection is established. The data is written to the console instead. Default is false.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.suspend"></a>suspend</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.suspend = function()</td></tr></table></blockquote><p>Suspends the polling. Use <ahref="#mxSession.resume"class=LFunctionid=link66onMouseOver="ShowTip(event, 'tt3', 'link66')"onMouseOut="HideTip('tt3')">resume</a> to reactive the session. Fires a suspend event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.resume"></a>resume</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.resume = function(</td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Resumes the session if it has been suspended. Fires a resume-event before starting the polling.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.stop"></a>stop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.stop = function(</td><tdclass=PParameternowrap>reason</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Stops the session and fires a disconnect event. The given reason is passed to the disconnect event listener as the second argument.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.poll"></a>poll</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.poll = function()</td></tr></table></blockquote><p>Sends an asynchronous GET request to <ahref="#mxSession.urlPoll"class=LVariableid=link67onMouseOver="ShowTip(event, 'tt11', 'link67')"onMouseOut="HideTip('tt11')">urlPoll</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.notify"></a>notify</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.notify = function(</td><tdclass=PParameternowrap>xml,</td></tr><tr><td></td><tdclass=PParameternowrap>onLoad,</td></tr><tr><td></td><tdclass=PParameternowrap>onError</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sends out the specified XML to <ahref="#mxSession.urlNotify"class=LVariableid=link68onMouseOver="ShowTip(event, 'tt12', 'link68')"onMouseOut="HideTip('tt12')">urlNotify</a> and fires a <ahref="#mxSession.notify"class=LFunctionid=link69onMouseOver="ShowTip(event, 'tt5', 'link69')"onMouseOut="HideTip('tt5')">notify</a> event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.get"></a>get</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.get = function(</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>onLoad,</td></tr><tr><td></td><tdclass=PParameternowrap>onError</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sends an asynchronous get request to the given URL, fires a <ahref="#mxSession.get"class=LFunctionid=link70onMouseOver="ShowTip(event, 'tt6', 'link70')"onMouseOut="HideTip('tt6')">get</a> event and invokes the given onLoad function when a response is received.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.isValidResponse"></a>isValidResponse</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.isValidResponse = function(</td><tdclass=PParameternowrap>req</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the response data in the given <ahref="mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link71onMouseOver="ShowTip(event, 'tt26', 'link71')"onMouseOut="HideTip('tt26')">mxXmlRequest</a> is valid.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.encodeChanges"></a>encodeChanges</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.encodeChanges = function(</td><tdclass=PParameternowrap>changes,</td></tr><tr><td></td><tdclass=PParameternowrap>invert</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the XML representation for the given array of changes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.receive"></a>receive</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.receive = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the given node by applying the changes to the model. If the nodename is state, then the namespace is used as a prefix for creating Ids in the model, and the child nodes are visited recursively. If the nodename is delta, then the changes encoded in the child nodes are applied to the model. Each call to the receive function fires a <ahref="#mxSession.receive"class=LFunctionid=link72onMouseOver="ShowTip(event, 'tt7', 'link72')"onMouseOut="HideTip('tt7')">receive</a> event with the given node as the second argument after processing. If changes are processed, then the function additionally fires a <ahref="#mxSession.mxEvent.FIRED"class=LEventid=link73onMouseOver="ShowTip(event, 'tt36', 'link73')"onMouseOut="HideTip('tt36')">mxEvent.FIRED</a> event before the <ahref="#mxSession.mxEvent.RECEIVE"class=LEventid=link74onMouseOver="ShowTip(event, 'tt37', 'link74')"onMouseOut="HideTip('tt37')">mxEvent.RECEIVE</a> event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.processState"></a>processState</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.processState = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the given state node which contains the current state of the remote model.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.processDelta"></a>processDelta</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.processDelta = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the given delta node which contains a sequence of edits which in turn map to one transaction on the remote model each.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.processEdit"></a>processEdit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.processEdit = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the given edit by executing its changes and firing the required events via the model.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.createUndoableEdit"></a>createUndoableEdit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.createUndoableEdit = function(</td><tdclass=PParameternowrap>changes</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a new <ahref="mxUndoableEdit-js.html#mxUndoableEdit"class=LClassid=link75onMouseOver="ShowTip(event, 'tt32', 'link75')"onMouseOut="HideTip('tt32')">mxUndoableEdit</a> that implements the notify function to fire a <change> and <ahref="#mxSession.notify"class=LFunctionid=link76onMouseOver="ShowTip(event, 'tt5', 'link76')"onMouseOut="HideTip('tt5')">notify</a> event via the model.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.decodeChanges"></a>decodeChanges</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.decodeChanges = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Decodes and executes the changes represented by the children in the given node. Returns an array that contains all changes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.decodeChange"></a>decodeChange</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.decodeChange = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Decodes, executes and returns the change object represented by the given XML node.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSession.cellRemoved"></a>cellRemoved</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.cellRemoved = function(</td><tdclass=PParameternowrap>cell,</td></tr><tr><td></td><tdclass=PParameternowrap>codec</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds removed cells to the codec object lookup for references to the removed cells after this point in time.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CClass>Extends mxEventSource to implement a graph model. </div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.suspend = function()</td></tr></table></blockquote>Suspends the polling. </div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.resume = function(</td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PParameternowrap>attr,</td></tr><tr><td></td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Resumes the session if it has been suspended. </div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.stop = function(</td><tdclass=PParameternowrap>reason</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Stops the session and fires a disconnect event. </div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.notify = function(</td><tdclass=PParameternowrap>xml,</td></tr><tr><td></td><tdclass=PParameternowrap>onLoad,</td></tr><tr><td></td><tdclass=PParameternowrap>onError</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sends out the specified XML to urlNotify and fires a notify event.</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.get = function(</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>onLoad,</td></tr><tr><td></td><tdclass=PParameternowrap>onError</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sends an asynchronous get request to the given URL, fires a get event and invokes the given onLoad function when a response is received.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSession.prototype.receive = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Processes the given node by applying the changes to the model. </div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxSession(</td><tdclass=PParameternowrap>model,</td></tr><tr><td></td><tdclass=PParameternowrap>urlInit,</td></tr><tr><td></td><tdclass=PParameternowrap>urlPoll,</td></tr><tr><td></td><tdclass=PParameternowrap>urlNotify</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new session using the given mxGraphModel and URLs to communicate with the backend.</div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSession.prototype.model</td></tr></table></blockquote>Reference to the enclosing mxGraphModel.</div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0cl