Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8918191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:41:28+00:00 2026-06-15T05:41:28+00:00

I have a spring controller; @RequestMapping(/showreport) @ResponseBody public Map<String, ? extends Object> showreport (parameters)

  • 0

I have a spring controller;

@RequestMapping("/showreport")
@ResponseBody
public Map<String, ? extends Object> showreport
        (parameters) 
{
    List<Object> listOne = ...;
    Object objectOne = ...;


    Map<String,Object> modelMap = new HashMap<String,Object>(3);
    modelMap.put("total", listOne.size());
    modelMap.put("data", listOne);
    modelMap.put("summary", objectOne);
    modelMap.put("success", true);
    return modelMap;
}

and I have ExtJS code like this to show grid in a modal window

Ext.Ajax.request({                 
        url: 'url',
        params:
        {
            // parameters 
        },
        success: function (response) 
        {                     
             var jsonData = Ext.util.JSON.decode(response.responseText);

             store.proxy = new Ext.ux.data.BufferedPagingMemoryProxy(jsonData.data);
             /* what will I do */

             new Ext.Window({
                title: 'title',
                plain: true,
                border: false,
                modal: true,
                items: [grid],
                height:Ext.getBody().getViewSize().height - 100,
                width:Ext.getBody().getViewSize().width*0.8 //80%
            }).show();

        },
        failure: function (){},
     });

and my grid, store and readers are like this;

    var Report = Ext.data.Record.create([
    {name: 'a'},
    {name: 'b', type: 'string'}, 
    {name: 'c', type: 'string'}, 
    {name: 'd', type: 'string'}, 
    {name: 'e', type: 'string'}, 
    {name: 'f', type: 'string'}, 
    {name: 'g'}, 
    {name: 'h'}, 
    {name: 'i', type: 'string'}, 
    {name: 'j'}, 
    {name: 'k', type: 'string'}, 
    {name: 'l', type: 'string'}
]); 


var reader = new Ext.data.JsonReader({
    totalProperty: 'total',
    successProperty: 'success',
    idProperty: 'id',
    root: 'data'
},
Report);

store = new Ext.data.JsonStore({
    id: 'reportID',
    reader: reader
});

var grid = new Ext.grid.GridPanel({
    id: 'tripDailyReportList',
    store: store,
    autoHeight : true,
    loadMask: true,
    autoHeight: true,
    columns:[
            new Ext.grid.RowNumberer(),
            {header: 'headerA', dataIndex: 'a'},
            {header: 'headerB', dataIndex: 'b'},
            {header: 'headerC', dataIndex: 'c', sortable: true},
            {header: 'headerD', dataIndex: 'd', sortable: true},
            {header: 'headerE', dataIndex: 'e', sortable: true},
            {header: 'headerF', dataIndex: 'f'},
            {header: 'headerG', dataIndex: 'g'},
            {header: 'headerH', dataIndex: 'h'},
            {header: 'headerI', dataIndex: 'i'},
            {header: 'headerJ', dataIndex: 'j'},
            {header: 'headerK', dataIndex: 'k'}
            ]
});

I want to load a grid in a window after ajax request. I opened the window, but i couldn’t load store with data. my json is like this;

{“total”:56,”data”:[{“a”: “1”, “b”: “2”, “c”: “3”, “d”: “4”, “e”: “5”, “f”: “6”, “g”: “7”, …..}],”summary”:{“a”:”1″,”b”:”2″,”c”:”3″,”d”:”4″,”e”:”5″,”f”:”6″},”success”:true}

can you help me, to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:41:30+00:00Added an answer on June 15, 2026 at 5:41 am

    We must include json meta tags in controller. Reader’s idProperty must same with json’s idProperty. Than we can use var jsonData = Ext.util.JSON.decode(response.responseText); grid.store.loadData(jsonData);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine I have this annotated method in a Spring 3 @Controller @RequestMapping() public @ResponseBody
Let's say I have a handler in a Spring MVC controller: @RequestMapping public String
I have a spring (3.1) controller action method like this: @RequestMapping(value=/{id}) public String myAction(@PathVariable(id)
I have @Controller @RequestMapping(value=core/*) public class CoreController { public static String exceptionOccurredView = /core/exceptionOccurred;
I have a spring controller with a request mapping as follows @RequestMapping(/downloadSelected) public void
I have a Spring MVC Controller class (bean): @Controller @RequestMapping(/index.jsp) public class EjbCaller {
I have this code for my Spring-based web project: Controller: @Controller @RequestMapping(mycontroller) public class
Imagine that I have a Spring MVC controller something like this: @Controller @RequestMapping(/base-url) public
In Spring MVC I have the following controller: @RequestMapping(value=adminUsers, method = RequestMethod.POST) public ModelAndView
I have written a resteasy-spring service : @Controller @RequestMapping(/abr/asd) @Path(/ab/ac) public class JobSchedulerService {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.