01.06.2013 Views

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

eforeDelete event<br />

beforeDelete event<br />

Fires before the JSDO, by means of a saveChanges( ) call following a remove( ) call,<br />

sends a request the AppServer to delete a record.<br />

Applies to: progress.data.JSDO class, saveChanges( ) method, table reference<br />

property (JSDO)<br />

The following parameters appear in the signature of the event handler function:<br />

Syntax<br />

function ( jsdo , record , request )<br />

jsdo<br />

record<br />

request<br />

A reference to the JSDO that is invoking the delete operation. For more<br />

information, see the description of the jsdo property of the request object.<br />

A reference to the temp-table record upon which the delete operation is about to<br />

act. For more information, see the description of the jsrecord property of the<br />

request object.<br />

A reference to the request object returned before the delete operation begins. For<br />

more information, see the description of the request object.<br />

Example:<br />

/* subscribe to event */<br />

myjsdo.subscribe('beforeDelete', onBeforeDelete);<br />

/* some code that would delete a record and send to the server */<br />

var jsrecord = myjsdo.findById(myid);<br />

myjsdo.remove();<br />

myjsdo.saveChanges();<br />

function onBeforeDelete( jsdo , record , request ) {<br />

/* code to execute before sending request to the server */<br />

};<br />

See also: remove( ) method, subscribe( ) method, unsubscribe( ) method<br />

<strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong> 199

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!