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.

Two additional properties are available for access on a JSDO:<br />

JSDO overview<br />

• name — A String property that returns the name of the <strong>Mobile</strong> resource for which<br />

the JSDO is created. You must set this value either directly or indirectly using the<br />

progress.data.JSDO class constructor when you instantiate a JSDO. You can<br />

read the property on the JSDO after it is created.<br />

• useRelationships — A Boolean property that when set to true makes all<br />

data-relations active in JSDO local storage so that searches on a child temp-table<br />

reference involve only records related to a its parent. In addition, record objects<br />

created for a child temp-table have their key fields automatically set in relation to<br />

their parent. When set to false, searches on a child temp-table reference involve<br />

all record objects stored for the temp-table, regardless of data-relations, and any<br />

record objects created for a child temp-table have no automatic settings for their<br />

key fields. This property can be set and reset at any time during the life of the<br />

JSDO to change the effect of data-relations on local storage.<br />

In addition to these JSDO properties, you can set additional initialization properties in<br />

the class constructor, along with the name property itself. These initialization properties,<br />

which you cannot access after the JSDO is created, allow you to specify that certain<br />

JSDO methods are called during instantiation, including:<br />

• Automatically calling the fill( ) method to initialize JSDO local storage as the<br />

object is created<br />

• Subscribing event handlers for JSDO events, especially the 'beforeFill' and<br />

'afterFill' events to handle the automatic execution of the fill( ) method<br />

For more information on setting the name and initialization properties in the JSDO class<br />

constructor, see the “Creating a JSDO for a <strong>Mobile</strong> resource” section on page 105.<br />

Requirements for using a JSDO<br />

The basic requirements for using a JSDO include having access to the <strong>Mobile</strong> resource<br />

it needs to access and set up a user login session to access that <strong>Mobile</strong> resource.<br />

To use a JSDO in a <strong>Mobile</strong> App, you need to ensure that the following actions<br />

have been completed:<br />

1. Deploy a <strong>Mobile</strong> Web application that contains a <strong>Mobile</strong> service with the <strong>Mobile</strong><br />

resource, or resources, you need to an Apache Tomcat Web server (such as the<br />

<strong>OpenEdge</strong>-installed OE Web Server), whether for testing or production. For more<br />

information on deployment for testing, see the sections on publishing <strong>Mobile</strong><br />

services for testing in Chapter 3, “Creating <strong>Mobile</strong> Services.” For more information<br />

on deployment for production, see the sections on deploying <strong>Mobile</strong> Web<br />

applications in Chapter 5, “Deploying <strong>Mobile</strong> <strong>Applications</strong>.”<br />

2. Instantiate the progress.data.Session class to create a user login session<br />

between the <strong>Mobile</strong> App and the <strong>Mobile</strong> Web application and ensure that you<br />

initialize it to use the same Web server authentication model as the <strong>Mobile</strong> Web<br />

application. For more information on coding for security considerations like the<br />

Web server authentication model, see the “Managing user login sessions” section<br />

on page 117.<br />

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

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

Saved successfully!

Ooh no, something went wrong!