01.06.2013 Views

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

JSDO overview<br />

– assign( ) — Called on a JSDO table reference or a JSRecord reference,<br />

this method updates field values for an existing record in JSDO local storage<br />

from property values of an object passed as a parameter to the method; has<br />

no effect on existing working record settings.<br />

Note: An assign( ) method is also available on a table reference of a<br />

progress.ui.UIHelper object. However, it updates the field values<br />

of an existing record from values in an HTML page. For more<br />

information, see the “Getting started with other HTML coding tools”<br />

section on page 122.<br />

– remove( ) — Called on a JSDO table reference or a JSRecord reference,<br />

this method deletes an existing record in JSDO local storage; no working<br />

record is set for the table reference or any of its child table references.<br />

These methods always execute synchronously. You save the changes that these<br />

methods make in JSDO local storage to the AppServer by calling the<br />

saveChanges( ) method on the JSDO, which executes asynchronously.<br />

• Searching for record objects in JSDO local storage:<br />

– find( ) — Searches for a record in a referenced temp-table according to the<br />

criteria defined by a function that you pass, and returns the record object if<br />

the function indicates it has been found; sets any record found as the working<br />

record for the table reference, and sets the working record for any child table<br />

references to the first record that is related to the parent working record.<br />

– findById( ) — Searches for a record in a referenced temp-table with the<br />

specified record ID, and returns the record object if found; sets any record<br />

found as the working record for the table reference, and sets the working<br />

record for any child table references to the first record that is related to the<br />

parent working record.<br />

– foreach( ) — Loops through the records of a referenced temp-table, and<br />

allows a function that you pass to access each record object and perform<br />

whatever actions you define until the function tells the method to stop looping<br />

or the method has reached the end of the record set; the record for each<br />

iteration is set as the working record for the table reference, and sets the<br />

working record for any child table references to the first record that is related<br />

to the parent working record. If the loop terminates, the last working record<br />

remains the working record for the table reference.<br />

These methods are called on a JSDO table reference and always execute<br />

synchronously.<br />

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

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

Saved successfully!

Ooh no, something went wrong!