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.

progress.data.JSDO class<br />

When you instantiate a JSDO, it relies on a prior login session that you can establish<br />

using an instance of the progress.data.Session class. This login session enables<br />

optionally secure communications between the client JSDO and the Web server,<br />

specified <strong>Mobile</strong> services, and ultimately the AppServer that implements the <strong>Mobile</strong><br />

resource accessed by the JSDO.<br />

Constructors Two constructors are available for the JSDO. The first constructor takes the name of<br />

the corresponding <strong>Mobile</strong> resource as a parameter; the second constructor takes an<br />

initialization object as a parameter:<br />

Syntax<br />

progress.data.JSDO ( resource-name )<br />

progress.data.JSDO ( init-object )<br />

resource-name<br />

A string expression set to the name of a resource provided by a <strong>Mobile</strong> service for<br />

which a login session has been started.<br />

init-object<br />

An object that can contain any writable JSDO properties. It must contain the<br />

required JSDO name property, which specifies the <strong>Mobile</strong> resource for the JSDO.<br />

It can also contain either or both of the following initialization properties:<br />

• autoFill — A Boolean that specifies whether the the JSDO invokes its<br />

fill( ) method upon instantiation to initialize its local storage with data from<br />

the <strong>Mobile</strong> resource. The default value is false.<br />

• events — An object that specifies one or more JSDO event subscriptions,<br />

each with its properties represented as an array, with the following syntax:<br />

Syntax<br />

events : {<br />

'event' : [ {<br />

[ scope : object-ref , ]<br />

fn : function-ref<br />

} ] [ ,<br />

'event' : [ {<br />

[ scope : object-ref , ]<br />

fn : function-ref<br />

} ] ] ...<br />

}<br />

event<br />

The name of an event to which the JSDO instance subscribes. See<br />

Table 13 for a list of available JSDO events.<br />

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

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

Saved successfully!

Ooh no, something went wrong!