Example 4 - Data Grids v2

In the first Data Grid example, I used a "hack" to provide content to the data grid. And although the approach can be effective, it's not considered a best practice. In this example, I'll present a more generally accepted way to connect a Data Grid and the underlying data store.

For version 2, the following will occur:

  • The JSP will fully render as HTML and be sent to the browser - without data
  • Dojo code in the browser will specify that data should be loaded from the server.
  • The data will be sent from the server to the browser via AJAX, in JSON format.
  • A data store will be bound to a Data Grid to display the results.

Note: This example builds on version 1. So if something seems unfamiliar, it may be best to review the initial Data Grid example.