1. #1
    Ext User
    Join Date
    Oct 2010
    Posts
    7
    Vote Rating
    0
    crowolf is on a distinguished road

      0  

    Default Combobox not loading json response

    Combobox not loading json response


    Hello,
    I'm having some trouble with the ComboBox. My response from the server is valid and looks okay when going to the url with a browser. The ComboBox is stuck on 'Loading...' however.

    This is the code of the view:
    Code:
    String url = "/SDIQueryServlet?ns=[%22NCBI Taxonomy%22]";
        ScriptTagProxy<PagingLoadResult<ModelData>> proxy = new ScriptTagProxy<PagingLoadResult<ModelData>>(url);
    
        ModelType type = new ModelType();
        type.setRoot("terms");
        type.addField("term", "term");
    
        JsonPagingLoadResultReader<PagingLoadResult<ModelData>> reader = new JsonPagingLoadResultReader<PagingLoadResult<ModelData>>(type);
    
        PagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy, reader);
    
        loader.addListener(Loader.BeforeLoad, new Listener<LoadEvent>() {
            public void handleEvent(LoadEvent be) {
            be.<ModelData> getConfig().set("start", be.<ModelData> getConfig().get("offset"));
            }
        });
    
        ListStore<ModelData> store = new ListStore<ModelData>(loader);
    I query a servlet that lives on my own server and use that as a proxy to a remote server.
    The response I get in my servlet is fine:
    Code:
    {"terms":[{"term":"content", "term2":"content2"}]}
    Am I missing something here?
    I tried adding a listener to the loader for the Loader.Load event, but that never triggers.
    Any help would be most welcome!

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Your response is not fine for a ScriptTagProxy. Your server gets a callback param which you need to use. Take a look at this example and the response from the server: http://www.sencha.com/examples/explo...vancedcombobox

  3. #3
    Ext User
    Join Date
    Oct 2010
    Posts
    7
    Vote Rating
    0
    crowolf is on a distinguished road

      0  

    Default


    sven, thanks a bunch for your response!
    I went with a HttpProxy instead and that works like a charm =)

Similar Threads

  1. Problem loading Json store into a comboBox
    By marxan in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 26 Oct 2010, 1:53 AM
  2. Loading a comboBox from a JSON store
    By cwolves in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 20 Oct 2010, 10:11 AM
  3. EXTJS 3.0 Dynamically loading tree using JSON response
    By ankuravlani in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 20 Oct 2009, 10:21 AM
  4. [SOLVED] Filling up ComboBox from a JSON response
    By lobo-tuerto in forum Ext 2.x: Help & Discussion
    Replies: 20
    Last Post: 4 Feb 2008, 5:09 PM
  5. Loading json data via ajax into combobox.
    By Matthew Luke in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 14 Jun 2007, 7:18 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi