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 7603731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:43:47+00:00 2026-05-30T23:43:47+00:00

I’m trying to return some JSON from my Spring webapp using Jackson and parse

  • 0

I’m trying to return some JSON from my Spring webapp using Jackson and parse it and load it into a jqGrid.

I’ve got the data coming back and visible in Chrome via the JSONViewer extension. It looks correct to me.

Local tests with arraydata have been successful.

Here’s my JSP/HTML/JS:

 <link rel='stylesheet' type='text/css' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/ui-darkness/jquery-ui.css' />
 <link rel='stylesheet' type='text/css' href='css/jqGrid/ui.jqgrid.css' />

 <script type='text/javascript' src='js/jquery-1.7.1.min.js'></script>
 <script type='text/javascript' src='js/jquery-ui-1.8.17.custom.min.js'></script>
 <script type='text/javascript' src='js/i18n/grid.locale-en.js'></script>
 <script type='text/javascript' src='js/jquery.jqGrid.min.js'></script>

 <script type='text/javascript'>

$(document).ready(function () {
    jQuery("#list").jqGrid({        
        url:"formSubmit.html",
        datatype: "json",
        height: 700,
        width: 1100,
        colNames: ['ReqID', 'Family', 'ControlID', 'Name', 'Description', 'Category','Priority', 'Notes', 'Parent'],
        colModel: [
        { name: 'reqID', index: 'reqID', width: 40 },
        { name: 'family', index: 'family', width: 100 },
        { name: 'controlID', index: 'controlID', width: 100 },
        { name: 'reqName', index: 'reqName', width: 175 },
        { name: 'requirement', index: 'requirement', width: 450,cellattr: function (rowId, tv, rawObject, cm, rdata) { return 'style="white-space: normal;"' } },
        { name: 'category', index: 'category', width: 100 },
        { name: 'priority', index: 'priority', width: 100 },
        { name: 'requirementNotes', index: 'requirementNotes', width: 100 },
        { name: 'parent', index: 'parent', width: 100 }
        ],
        rowNum: 10,
        rowList: [10, 20, 30],
        pager: '#pager',
        viewrecords: true,
        jsonReader : { repeatitems: false }
    });

    jQuery("#list").jqGrid('navGrid', '#pager', { edit: false, add: false, del: false });

});
 </script>

<table id = 'list'></table>

Here’s some data coming back from my Spring container using Jackson:

{
"total":"1",
"page":"1",
"records":"558",
"rows":[{
    "parent":"",
    "priority":"",
    "requirementNotes":"DummyData",
    "category":"DummyData",
    "family":"DummyData",
    "requirement":"DummyData",
    "reqID":"1",
    "controlID":"DummyData",
    "reqName":"DummyData"}]
}

I’m consistently getting back an Uncaught TypeError cannot read property ‘0’ in undefined as my response in jquery.jqGrid.min.js:23 and I’m stumped.

  • 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-30T23:43:49+00:00Added an answer on May 30, 2026 at 11:43 pm

    How you can see from the demo, which uses the JSON data which you posted and your code, the jqGrid should work in general.

    I can only repeat the same what I wrote already in my previous comment: the parameter url:"formSubmit.html" seems to me very suspected. If you call some dynamic components you URL should be either without extension like “/myurl/” or with some other extension as ‘.html’. I recommend you to analyse the HTTP traffic with respect of Fiddler, Firebug or Developer Tools of IE or Chrome (look at “Network” Tab). Important can be not only the HTTP body, but the HTTP headers like “Content-Type”.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.