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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:53:35+00:00 2026-05-23T01:53:35+00:00

I’m new in Ext and I have a problem: I’m trying to fill extjs-grid

  • 0

I’m new in Ext and I have a problem: I’m trying to fill extjs-grid with data:

    Ext.onReady(function() {
        var store = new Ext.data.JsonStore({
            root: 'topics',
            totalProperty: 'totalCount',
            idProperty: 'threadid',
            remoteSort: true,
            autoLoad: true, ///

            fields: [
                'title', 'forumtitle', 'forumid', 'author',
                {name: 'replycount', type: 'int'},
                {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
                'lastposter', 'excerpt'
            ],

            proxy: new Ext.data.ScriptTagProxy({
            url:'http://10.10.10.101:8080/myproject/statusList/getJobs/2-10/search-jobname-/sort-asdf/filterjobname-123/filterusername-davs/filterstatus-completed/filtersubmdate-today',
            method : 'GET'
        })
    });

    //
    var cm = new Ext.grid.ColumnModel([
        {sortable:true, id : 'id',          dataIndex:'id'},
        {sortable:true, id : 'title',       dataIndex:'title'},
        {sortable:true, id : 'forumtitle',  dataIndex:'forumtitle'},
        {sortable:true, id : 'forumid',     dataIndex:'forumid'},
        {sortable:true, id : 'author',      dataIndex:'author'}
    ]);

    var grid = new Ext.grid.GridPanel({
        id: 'mainGrid',
        el:'mainPageGrid',
        pageSize:10,
        store:store,
        //    stripeRows: true,
        cm:cm,
        stateful: false, // skipSavingSortState
        viewConfig:{
            forceFit:true
        },
        //        width:1000,
        //        height:700,
        loadMask:true,
        frame:false,

        bbar: new Ext.PagingToolbar({
            id : 'mainGridPaginator',
            store:store,
            hideRefresh : true,
            plugins: new Ext.ux.Andrie.pPageSize({
                beforeText: 'View: ',
                afterText: '',
                addAfter: '-',
                variations: [10, 25, 50, 100, 1000]
                //comboCfg: {
                    //id: '${ dispview_widgetId }_bbar_pageSize'
                //}
            }),
            displayMsg: 'Displaying items {0} - {1} of {2}',
            emptyMsg:'No data found',
            displayInfo:true
        })
    });

    grid.render();
});

and the Java part:

@GET
@Path("/getJobs/{startFrom}-{startTo}/search-{searchType}-{searchName:.*}/" +
        "sort-{sortType}/filterjobname-{filterJobName:.*}/filterusername-{filterUsername:.*}/" +
        "filterstatus-{filterStatus:.*}/filtersubmdate-{filterSubmittedDate:.*}")
@Produces({"application/json"})
@Encoded
public String getJobs(
        @PathParam("startFrom")             String startFrom,
        @PathParam("startTo")               String startTo,
        @PathParam("searchType")            String searchType,
        @PathParam("searchName")            String searchName,
        @PathParam("sortType")              String sortType,
        @PathParam("filterJobName")         String filterJobName,
        @PathParam("filterUsername")        String filterUsername,
        @PathParam("filterStatus")          String filterStatus,
        @PathParam("filterSubmittedDate")   String filterSubmittedDate) {


    return "{totalCount:'3',topics:[{title:'XTemplate with in EditorGridPanel',threadid:'133690',username:'kpremco',userid:'272497',dateline:'1305604761',postid:'602876',forumtitle:'Ext 3x Help',forumid:'40',replycount:'2',lastpost:'1305857807',lastposter:'kpremco',excerpt:'Hi I have an EditiorGridPanel whose one column i am using XTemplate to render and another Column is Combo Box FieldWhen i render the EditorGri'}," +
                                             "{title:'IFrame error _flyweights is undefined',threadid:'133571',username:'Daz',userid:'52119',dateline:'1305533577',postid:'602456',forumtitle:'Ext 3x Help',forumid:'40',replycount:'1',lastpost:'1305857313',lastposter:'Daz',excerpt:'For Ext 330 using Firefox 4  Firebug, the following error is often happening when our app loads e._flyweights is undefined Yetthis '}," +
                                             "{title:'hellllllllllllllpwhy it doesnt fire cellclick event after I change the cell value',threadid:'133827',username:'aimer311',userid:'162000',dateline:'1305700219',postid:'603309',forumtitle:'Ext 3x Help',forumid:'40',replycount:'3',lastpost:'1305856996',lastposter:'aimer311',excerpt:'okI will discribe this problem as more detail as I canI look into this problem for a whole dayI set clicksToEdit1 to a EditorGridPanelso when I'}]}";

As a result I’m getting a JavaScript error:

Syntax error at line 1 while loading:
totalCount:'3',topics:[{title:'XTemplate
---------------------^
expected ';', got ':'

Although, when I’m using Proxy’s URL:

URL: 'http://extjs.com/forum/topics-browse-remote.php',

which represents same information, I don’t have any problems.

Where is my failure????

P.S. Comments for the first answer:

    return "{\"totalCount\":\"3\",\"topics\":[{\"title\":\"XTemplate with in EditorGridPanel\",\"threadid\":\"133690\",\"username\":\"kpremco\",\"userid\":\"272497\",\"dateline\":\"1305604761\",\"postid\":\"602876\",\"forumtitle\":\"Ext 3x Help\",\"forumid\":\"40\",\"replycount\":\"2\",\"lastpost\":\"1305857807\",\"lastposter\":\"kpremco\",\"excerpt\":\"Hi I have an EditiorGridPanel whose one column i am using XTemplate to render and another Column is Combo Box FieldWhen i render the EditorGri\"}," +
                                             "{\"title\":\"IFrame error _flyweights is undefined\",\"threadid\":\"133571\",\"username\":\"Daz\",\"userid\":\"52119\",\"dateline\":\"1305533577\",\"postid\":\"602456\",\"forumtitle\":\"Ext 3x Help\",\"forumid\":\"40\",\"replycount\":\"1\",\"lastpost\":\"1305857313\",\"lastposter\":\"Daz\",\"excerpt\":\"For Ext 330 using Firefox 4  Firebug, the following error is often happening when our app loads e._flyweights is undefined Yet, this \"}," +
                                             "{\"title\":\"hellllllllllllllpwhy it doesn't fire cellclick event after I change the cell value\",\"threadid\":\"133827\",\"username\":\"aimer311\",\"userid\":\"162000\",\"dateline\":\"1305700219\",\"postid\":\"603309\",\"forumtitle\":\"Ext 3x Help\",\"forumid\":\"40\",\"replycount\":\"3\",\"lastpost\":\"1305856996\",\"lastposter\":\"aimer311\",\"excerpt\":\"okI will discribe this problem as more detail as I canI look into this problem for a whole dayI set clicksToEdit1 to a EditorGridPanelso when I\"}]}";

I’ve got the following error:

Syntax error at line 1 while loading:
{"totalCount":"3","topics":[{"title
-------------^
expected ';', got ':'

P.S. #2. When I’ve added ‘[‘ to the begining of the response string and ‘]’ to the end , erros disappered, but grid hasn’t been filled with data

  • 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-23T01:53:36+00:00Added an answer on May 23, 2026 at 1:53 am

    I have found the root of issue.

    As I’ve known Ext send to my web service function with parameter ‘callback=[some_callback_name]’ (e.g. callback1001). It means that Extjs wanna to get results not just in JSON format, but in format ‘callback1001()’. When I’ve return my data in this format everything became good.

    Proof links:

    • http://www.sencha.com/forum/showthread.php?22990-Json-Invalid-label (response #6)

    • http://indiandeve.wordpress.com/2009/12/02/extjs-error-invalid-label-error-while-using-scripttagproxy-for-json-data-in-paging-grid-example/

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

Sidebar

Related Questions

I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
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
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported

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.