Hi, I have a chart and 1 grid on the page. When I visit the page, the two components should show. What I am trying to do here is
1. Create two stores. one for the chart and the other for the grid.
2. Make one call to the server.
3. Server should send two json arrays with different roots
4. identify the roots and display data.

I am stuck in step 3 and do not understand how to code on the server side ( In java) can someone help me please. Here is my code -

client side-
Code:
App.DisplayHelper = {
    firstchartstore: new Ext.data.JsonStore({
        fields: [
                -- list of fields                                                                       
                ],
        root: 'firstchart.data'
    }),
   
    gridstore: new Ext.data.JsonStore({
        fields: [
                    --list of fields                                        
                ],
        root: 'flowers.data'
    }),
    load: function() {
        Ext.Ajax.request({
            url:  '/ext/testServlet?action=getData',
            success: function(response) {
                var data = Ext.decode(response.responseText);
                App.DisplayHelper.firstchartstore.loadData(data);
                App.DisplayHelper.secondchartstore.loadData(data);
                App.DisplayHelper.gridstore.loadData(data);
          
            }
        });
    }
    };

App.DisplayViewer = new Ext.Window({
    -- config
    items: new Ext.form.FormPanel({
    -- config
        items: [
            { xtype: 'piechart',
               -- other config
               store: App.DisplayHelper.firstchartstore},
             { xtype: 'grid', 
                columns:[
                -- list of columns for the grid.
                ] ,
                store: App.DisplayHelper.gridstore
            }
        ]
    })
});

App.DisplayViewer.on('beforeshow', App.DisplayHelper.load, App.DisplayHelper);
Server Side- Need Help to create JSON arrays.

Code:
private String getData(HttpServletRequest request, String serverSideStart) {  
List<Flowers> flowers= new ArrayList<Flowers>();      
-- fetch all the flowers

JsonObjectResponse jsonResponse = new JsonObjectResponse();
        jsonResponse.setTotalRows(flowers.size);
        jsonResponse.setSuccess(true);
        jsonResponse.setData(flowers);
        jsonResponse.setMessage("Success");
    
        // Return the list of flowers objects as a serialized string.
        out.write(new JSONSerializer().serialize("flowers", jsonResponse));

        ?? I need to return chart data as well ??
}