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

  • SEARCH
  • Home
  • 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 6798001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:40:40+00:00 2026-05-26T18:40:40+00:00

Please help me out in the below mentioned situation; My java web application uses

  • 0

Please help me out in the below mentioned situation;

My java web application uses JSON as data-interchange format. While running; firebug(firefox) shows the response as well as JSON data as expected; but the grid is not updating as expected rather it comes blank. Below are the store and grid definition;

//Grid & Store definition

    var searchResultStore = Ext.create('Ext.data.JsonStore', {
    model : 'BookModel',
    proxy : {
        type : 'ajax',
        reader : {
            totalProperty : 'results',
            type : 'json',
            root : 'data'
        }
    },
    autoLoad : true
});

Ext.define('Library.SearchBookGrid', {
    extend : 'Ext.grid.Panel',
    alias : 'widget.SearchBookGrid',
    id : 'searchBookGrid',
    title : 'Books',
    closable : true,
    initComponent : function() {

        this.store = searchResultStore;

        this.columns = [ {
            xtype : 'gridcolumn',
            dataIndex : 'title',
            text : 'Title'
        }, {
            xtype : 'gridcolumn',
            dataIndex : 'authorName',
            text : 'Author'
        } ];


        this.callParent(arguments);
    }
});

There is a BOOK SEARCH ExtJS form; which calls a URL (/MyLibrary/Books?action=6) & the search form values are submitted as JSONDATA. The search result is assigned as to the store (searchResultStore) follows;

    Ext.Ajax.request({
        url : '/MyLibrary/Books?action=6', 
        headers: {'Content-Type':'application/json; charset=utf-8'},
        jsonData : Ext.JSON.encode(form.getValues()),
        params:{
        action : 6
        },
        method : 'POST',
        success : function(response, request) {
               searchResultStore.loadData(Ext.JSON.decode(response.responseText));
        },
        failure : function(results, request) {
                Ext.Msg.alert("Search..", "Please try again...!!");
        },
});

Did I miss anything or i am wrong in this codes……please help….!!!!

Thanks in advance…!!

  • 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-05-26T18:40:40+00:00Added an answer on May 26, 2026 at 6:40 pm

    Given that i saw you put a reader on the store with the root data, i hope the json you use to load the data is not of that format.

    loadData function expects an array of models, or an array of elements.
    like [{"id":1},{.... My concern is that you try to use the reader and your json looks like:

    {"data":[{"id:1},{..... 
    

    Then again this might not be the problem. I hope it helps

    EDIT well the problem is what i was trying to say in the first comment, The reader you set on the store is used only when loading the store by the load function. LoadData expects an array so if you want a quick fix try:

    searchResultStore.loadData(Ext.JSON.decode(response.responseText).data);
    

    But I suggest you use the store load method instead of an ajax request which will use the reader.

      searchResultStore.load({
        url : '/MyLibrary/Books?action=6', 
        jsonData : Ext.JSON.encode(form.getValues()),
        extraParams:{
        action : 6
        },
    })
    

    Check the docs for load function and see what params it can take

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

Sidebar

Related Questions

I'm having trouble with some jQuery stuff, please help me out. Below is my
could someone please help me out with the (simplified) code below. I'm trying to
I'm a regex newbie, please help me out. The string below occurs in one
Please help me out with an algorithm for the following problem - Given a
Please help me out on this explode() function issue. I am getting unexpected results
Please help me out here because im getting kind of confused.. I have a
Can someone please help me out with printing the contents of an IFrame via
Can someone please help me out with a JavaScript/jQuery solution for this arithmetic problem:
Ok so could anyone please help me out with the VB for auto entering
I'm a developer and I suck at SQL:) Please help me out here. I'd

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.