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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:27:54+00:00 2026-05-25T12:27:54+00:00

I’ve got an issue when using an extjs combo box (regardless of browser, tested

  • 0

I’ve got an issue when using an extjs combo box (regardless of browser, tested in Chrome and FF with same result).

The combo box loads just fine, both entries are displayed. I can select one of the two that are loaded initially, but if I try and change the selection after I’ve already selected, it keeps the original value and no select or change event is fired. I found that if I start typing in the non-selected entry, auto complete takes over, and I can hit the return key to select the entry and a select event and change event are fired. Why can I not just simply click on the unselected entry to select it?

Here’s the model, reader, data store, and combo box code:

//Model
Ext.define('cbMonitorModel', {
    extend: 'Ext.data.Model',
    fields: [
        {name: 'iMonitorID', type: 'String'},
        {name: 'sMonitorName', type: 'String'}
    ]
});

//Reader
var cbMonitorReader = Ext.create('Ext.data.JsonReader',{
    type: 'json',
    model: 'cbMonitorModel'
});

//Store
var cbMonitorDataStore = Ext.create('Ext.data.Store',{
fields: ['iMonitorId','sMonitorName'],
autoLoad: true,
proxy: {
    type: 'ajax',
    url: '/inc/ajax/Monitors.php',
    actionMethods: 'POST',
    reader: cbMonitorReader,
    extraParams: {
        task: 'getMonitors',
        domain: sMonitorDomainName
    }
}
});

//ComboBox
Ext.create('Ext.form.ComboBox',{
    fieldLabel: 'Monitor',
    store: cbMonitorDataStore,
    queryMode: 'local',
    displayField: 'sMonitorName',
    valueField: 'iMonitorId',
    renderTo: Ext.get('monitorSelect'),
    width: 400,
    listeners: {
        select: function(combo, records, opts) {
            console.log('MonitorComboBox - Select');
            console.log(combo);
            console.log(records);
            console.log(opts);
            console.log(cbMonitorDataStore);
            console.log('--------------------------------------------------------------------');
        }
    }
});

The proxy returns the following string:

[{"iMonitorID":"85","sMonitorName":"6176 - xxx.xxx.xxx.xxx default monitor"},{"iMonitorID":"86","sMonitorName":"14177 - aaa.bbbbbbbbb.com default monitor"}]

Thanks. Any help would be appreciated.


Edit: 2011-09-08 16:32 CST

I still haven’t figured this problem out, but in the meantime, I’ve found a “dirty” work around… expand event clears out the previous value, which allows the user to select a different value, but then the problem was that I couldn’t use “getValue()”… hence the cb.lastSelection[0].raw.iMonitorID string…

ComboBox code:

var MonitorCB = Ext.create('Ext.form.ComboBox', {
    fieldLabel: 'Monitor',
    store: cbMonitorDataStore,
    queryMode: 'local',
    displayField: 'sMonitorName',
    valueField: 'iMonitorName',
    width: 400,
    renderTo: 'monitorSelect',
    listeners: {
        select: function(cb, rec, opts){
            console.log(cb.lastSelection[0].raw.iMonitorID);
        },
        expand: function(){this.clearValue()}
    }
});
  • 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-25T12:27:54+00:00Added an answer on May 25, 2026 at 12:27 pm

    You have mistake in your code. In combobox config valueField: 'iMonitorId' is specified with small letter d whereas in model config name: 'iMonitorID' is specified with large one (and the proxy returns 'iMonitorID's).

    By the way. You are using both reader with model and store’s fields config. The correct model’s fields config is not used because store already have the wrong fields config.

    So the solution would be:

    1. get rid of fields: ['iMonitorId','sMonitorName'], in store’s config.
    2. change valueField to 'iMonitorID' in combobox’ config.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i got an object with contents of html markup in it, for example: string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.