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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:51:09+00:00 2026-05-22T11:51:09+00:00

This is driving me insane. I have a JS file that is: Ext.onReady(function(){ Ext.QuickTips.init();

  • 0

This is driving me insane. I have a JS file that is:

  Ext.onReady(function(){
     Ext.QuickTips.init();

     var SitesStore = new Ext.data.JsonStore({
        autoLoad: true,
        fields: [{
           name: 'id',
           mapping: 'id'
        }, {
           name: 'name',
           mapping: 'name'
        }],
        proxy: {
           type: 'ajax',
           url : '/sites/getsites.do'
        },
        storeId: 'SitesStore',
        root: 'sites',
        url: '/sites/getsites.do',
        xtype: 'jsonstore'
     });

     SitesStore.load(function(data){
        Ext.create('Ext.form.ComboBox', {
           fieldLabel: 'Choose Site...',
           store: SitesStore,
           data: data[0].raw["sites"],
           queryMode: 'remote',
           displayField: 'name',
           valueField: 'id',
           renderTo: "timesheetSearch"
        });

        console.log(data[0].raw["sites"]);
     });

  }); //end onReady

My /sites/getsites.do returns JSON data in the following format:

{
    -sites: [
        -{
            id: "12345678"
            name: "Blah Warehouse"
        },
        -{
            id: "5999B91DF6C0"
            name: "WalMart Warehouse"
        },
        ...
}

I realize the data[0].raw["sites"] probably isn’t the preferred way to access the data but I do confirm that the data is being populated and I’m getting back 136 sites.

The combobox DOES render. However, the live search doesn’t work and there are no entries.

I’m new to ExtJS.

Any tips would be appreciated.

Thanks

UPDATE

This code WORKS

var SitesStore = Ext.create('Ext.data.Store', {
    autoLoad: true,
    fields: ['id','name'],
    data: [{'id':'aaaa', 'name':'Honeywell'}],
    storeId: 'SitesStore',
    root: 'sites'
});

Ext.create('Ext.form.ComboBox', {
    fieldLabel: 'Choose Site...',
    store: SitesStore,
    queryMode: 'remote',
    displayField: 'name',
    triggerAction: 'all',
    valueField: 'id',
    renderTo: "timesheetSearch"
});

This does NOT

var SitesStore = Ext.create('Ext.data.Store', {
    autoLoad: true,
    fields: ['id','name'],
    proxy: {
        type: 'ajax',
        url: '/sites/getsites.do'
    },
    storeId: 'SitesStore',
    root: 'sites'
});

Ext.create('Ext.form.ComboBox', {
    fieldLabel: 'Choose Site...',
    store: SitesStore,
    queryMode: 'remote',
    displayField: 'name',
    triggerAction: 'all',
    valueField: 'id',
    renderTo: "timesheetSearch"
});

When I run it without a proxy (and specify a url) I get an error saying I didn’t specify a proxy.

Thanks

UPDATE

UGH!!!!!!

I got it. Here is the correct JSONStore

var SitesStore = Ext.create('Ext.data.Store', {
    autoLoad: true,
    fields: ['id','name'],
    proxy: {
        type: 'ajax',
        url: '/sites/getsites.do',
        reader: {
            type:'json',
            root: 'sites'
        }
    },
    storeId: 'SitesStore',
    root: 'sites'
});

Thanks everyone. Couldn’t believe how hard this was. Mainly because I couldn’t find a good tutorial. lol

  • 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-22T11:51:10+00:00Added an answer on May 22, 2026 at 11:51 am

    UPDATE

    I was able to figure this out. Here is the working code:

    var SitesStore = Ext.create('Ext.data.Store', {
         autoLoad: true,
         fields: ['id','name'],
         proxy: {
            type: 'ajax',
            url: '/sites/getsites.do',
            reader: {
               type:'json',
               root: 'sites'
            }
         },
         storeId: 'SitesStore',
         root: 'sites'
      });
    
      Ext.create('Ext.form.ComboBox', {
         fieldLabel: 'Choose Site...',
         store: SitesStore,
         queryMode: 'remote',
         displayField: 'name',
         triggerAction: 'all',
         valueField: 'id',
         renderTo: "timesheetSearch"
      });
    

    I never could get JSONStore to work so I created a standard Store and had to match the reader attribute with my JSON data.

    Hope this helps someone.

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

Sidebar

Related Questions

This is driving me crazy. I have this one php file on a test
This is driving me absolutely insane. I know that, to change the formatting of
This issue is driving me mad. I have several tables defined, and CRUD stored
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
This is driving me insane: I'm an intern: my boss wants me to use
This is driving me insane. All I want to do is pass a command
I have an XML document: var xml:XML = new XML(<rootNode> <head> <meta name=template content=Default
On this site: http://www.rent-turkey-property.com/ I have it set so that when you select a
This is driving me insane! Here's the code: public static void main(String[] strings) {
This has been driving me insane. I can't seem to get the RewriteMap directive

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.