I am new to both worklight adapters and dojo
I am using a SQL Adapter to return JSON format resultSet from a table, which I would like to display in a dojo datagrid.
How do I do this ?
Could anyone please point me to code samples ?
I am new to both worklight adapters and dojo
I am using a SQL Adapter to return JSON format resultSet from a table, which I would like to display in a dojo datagrid.
How do I do this ?
Could anyone please point me to code samples ?
Create a SQL Adapter using the Worklight adapter wizard. Please see exercise and code sample "SQL adapter – Communicating with SQL database" on developerWorks for a full walk through: http://www.ibm.com/developerworks/mobile/worklight/getting-started.html.
Next invoke the adapter using:
WL.Client.invokeProcedure(invocationData,{ onSuccess : getDataSuccess, onFailure : getDataFailure, });
Please see: How to use adapter inside the application in worklight
On successful retrieval of your data you can then populate a dojo data store and use it as the store in your dojox.grid.DataGrid.
Please see: http://dojotoolkit.org/reference-guide/1.9/dojox/grid/DataGrid.html