0

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 ?

  • Hi @user2397334, if the answer below allows you to display the results, can you please mark as accepted answer. – nspeete Mar 14 '14 at 17:34

1 Answers1

2
  1. 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.

  2. Next invoke the adapter using:

    WL.Client.invokeProcedure(invocationData,{ onSuccess : getDataSuccess, onFailure : getDataFailure, });

    Please see: How to use adapter inside the application in worklight

  3. 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

Community
  • 1
  • 1
nspeete
  • 659
  • 3
  • 10