title: jquery's flexigrid - looking to hand data via a serlet w/ gson
body: <p>New to java, but would love to implement my working jsp that generates xml used by a lovely jquery flexigrid to use a json version (generated by gson).  I'm just starting out w/ java basically, but would like to learn the best way to do this.  I've been looking at inner classes, but wanted to check out what would be considered best practice.</p>
  
  <p>The json expected format (I got this from another post here) is:</p>
  
  <pre><code>total: (no of rec)
   page : (page no)
   rows : {id: 1, cell: [ (col1 value) , (col2 value) ,.. ] },
          {id: 2, cell: [ (col1 value) , (col2 value) ,.. ] }
  </code></pre>
  
  <p>And, so far my non compilable java is:</p>
  
  <pre><code>private class _JsonReturn {
      int page ;
      int total ;
      class Rows {
          String id = new String();
          MultiMap cell = new MultiValueMap() ;
          private Rows( String newCell ) {
              this.id = newCell ;
          }
          private void _addRowValue( String cellValue ){
              this.cell.put( this.id, cellValue );
          }
          private Object _getRows() {
              return this ;
          }
  
      }      
  }
  </code></pre>
  
  <p>Help - I think I'm over complicating things here!  Thanks a ton in advance!</p>