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.

emove( ) method<br />

remove( ) method<br />

Deletes the specified temp-table record referenced in JSDO local storage. The<br />

specified record can either be the working record of a referenced temp-table or any<br />

record provided by a JSRecord object.<br />

After execution, any working record for an associated temp-table, and for any child<br />

temp-tables is not set. To synchronize the change on the AppServer, call the<br />

saveChanges( ) method.<br />

Return type: Boolean<br />

Applies to: JSRecord object, progress.data.JSDO class, table reference property<br />

(JSDO)<br />

Syntax<br />

[table-ref.]remove ( )<br />

jsrecord-ref.remove ( )<br />

table-ref<br />

A table reference on the JSDO for a temp-table that has a working record. If the<br />

JSDO references only a single temp-table, the method can be called on the JSDO<br />

itself.<br />

jsrecord-ref<br />

A reference to a JSRecord object for a temp-table record in JSDO local storage.<br />

The following code fragment shows a jQuery event defined on a delete button to delete<br />

the record displayed in a customer detail form from the eCustomer temp-table<br />

referenced in JSDO local storage:<br />

dataSet = new progress.data.JSDO( 'dsCustomerOrder' );<br />

$('#btnDelete').bind('click', function(event) {<br />

var jsrecord = dataSet.eCustomer.findById($('#custdetail #id').val());<br />

jsrecord.remove();<br />

dataSet.saveChanges();<br />

});<br />

The form has been previously displayed with values from the same record. When the<br />

button is clicked, the event handler uses the findById( ) method to find the original<br />

record with the matching internal record ID (jsrecord) and invokes the remove( )<br />

method on jsrecord to delete the record from eCustomer.<br />

See also: data property, saveChanges( ) method<br />

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

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

Saved successfully!

Ooh no, something went wrong!