Results 1 to 7 of 7

Thread: combobox display field with remote store

  1. #1
    Sencha Premium Member
    Join Date
    Jun 2015
    Posts
    20
    Answers
    1

    Default combobox display field with remote store

    I have a comobobox in a form. The combobox has a remote store(with paging) as its a huge dataset.

    The value of the combobox will be set by the form using the form.setValues(). But, the comobox will show empty as the store does not have relevant record or even if it does , it will have first page data.

    Now, How do display the value of the combobox, loading the store with the value set by form.

    The 'autoLoadOnValue' config seems to be for this purpose, but it has limitations.

    I need the store to reload with new id, when ever a value is set by enclosing form

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    So your combo has paging?

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2015
    Posts
    20
    Answers
    1

    Default

    Yes. This is how my config looks:
    Code:
    {
    ...            store: 'myRemoteStore',
                minChars: 3,
                pageSize: 20,
                queryParam: 'name',
                queryMode: 'remote',
                forceSelection: true,
    
                displayField: 'name',
                valueField: 'id'
    ...
    }
    The store is calling a service, which in back end has like 10,000 records. so I have paging and filter enabled on it.

  4. #4
    Sencha Premium User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Goiânia - GO, Brazil
    Posts
    898
    Answers
    15

    Default

    I think Ext JS combo has no responsibility for this, and this is a backend solution. You will need to tell you backend to select and return the record you want at the first page always. Them you won't have this problem for displayfields.
    Send an extra param to your backend asking for this.
    them make a SQL order by

    select * from table order by mycolumn = myValueNeededInResulto order by mycolumn ASC

    Doing this, you will always have the desired record included in the first page of the store.
    Wemerson Januario @JanuarioCoder
    Novanti Tecnologia, Sencha MVP/ Ext JS Consultant
    ____________________________________________
    Hire me on UpWork:

    GitHub
    https://github.com/wemersonjanuario

    Treinamento e Consultoria Ext JS. QUALIFIQUE-SE JÁ!

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2015
    Posts
    20
    Answers
    1

    Default

    The problem is - The combobox store should be able to load and display the record, when the combobox's value is set. The remote filter and paging is not the problem. The combobox's behavior should be the same if the store was local or remote (given a few extra config's set).We can look into this config 'autoLoadOnValue' and see the purpose we have it, and then realize its not a complete solution.

  6. #6
    Sencha Premium Member
    Join Date
    Jun 2015
    Posts
    20
    Answers
    1

    Default

    Appreciate any inputs / solutions to this. If my question is not clear enough, look at the 'autoLoadOnValue' config on combobox.This config is provided to address my problem, but it has limitations.

  7. #7
    Milzer's Avatar
    Join Date
    Nov 2011
    Location
    Aachen, Germany
    Posts
    5

    Default

    Any updates on this? I have exactly the same problem.

Similar Threads

  1. [OPEN] Initial field value not set in list of remote combobox
    By speller in forum Ext JS 6.x Bugs
    Replies: 6
    Last Post: 10 Sep 2015, 5:42 AM
  2. Initial field value not set in list of remote combobox
    By speller in forum Ext JS 6.x Q&A
    Replies: 6
    Last Post: 10 Sep 2015, 5:42 AM
  3. Replies: 6
    Last Post: 30 Jul 2014, 7:58 PM
  4. Remote ComboBox - Display all by default
    By gxt in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 15 Jun 2009, 12:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •