NonDesktop apps

Look at the getJSON() method for a section in the webview console.

See what it returns for a canvas section when you type in data into the fields on the canvas section.

Look at the base64_encode() function. Use it to encode the JSON string returned from getJSON() on the client.

Call a server side proc passing that base64 encoded string as a parameter to it.

In the server side procedure use base64_decode() to get the JSON string.

Now use json_decode() on that string.

Hey presto you have exchanged the data from your canvas on the client into an object on the server.

Now figure out what you want to do and then send a result back to the client. This is normally sent as a JSON string so that you can send an object back to the client rather than a single value.

Create a JavaScript object from the JSON you sent back to the client using JSON.parse( result ). You can also use JSON.stringify() to encode a JavaScript object as a string. Just google these. They are standard in all browsers.

Now you can reference the members of the JavaScript object, update your canvas section accordingly and then requery() your child section(s) by constructing a where condition that will be given as an argument to the requery() method for the target section.

Note that there currently is no setJSON() method for a section but I can see that would be useful for this scenario of handling manual querying of data. Submit an enhancement request ticket for that as it would reduce coding and be more consistent.

Also remember, Lianja.evaluate() is synchronous if no onsuccess callback is specified.

you can create an application “mobile” with DB “local” on the device?
No, it is client/server just like you build Web Apps.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s