Results 1 to 2 of 2

Thread: [CLOSED] Combobox in GXT 2.1

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Apr 2009
    Posts
    9
    Vote Rating
    0
      0  

    Default [CLOSED] Combobox in GXT 2.1

    When using a combobox, you are able to change the setStore method post render but, it doesn't update the dropdown. I created a combobox, added a treestore with one element with a displayField value of "foo", I then have an event that switches the treestore to a new liststore with one item with a displayname of "foo1". If I click the dropdown, I see the display of "foo". Can setStore be updated to assert that the component hasn't been rendered or properly handle switching the liststore after rendering? Thanks. Below is the code:

    ListStore<ModelData> list = new ListStore<ModelData>();
    BaseModel first = new BaseModel();
    first.set("id", "1");
    first.set("name", "foo");
    list.add(first);
    cb.setDisplayField("name");
    cb.setStore(list);


    public void onClick(ClickEvent event)
    {
    ListStore<ModelData> list = new ListStore<ModelData>();
    BaseModel first = new BaseModel();
    first.set("id", "1");
    first.set("name", "foo1");
    list.add(first);
    cb.setStore(list);
    }

  2. #2
    Sencha User
    Join Date
    Sep 2009
    Posts
    301
    Vote Rating
    1
      0  

    Default

    your code its wrong..

    you need manipule the SAME store..
    • removing
    • adding
    • updating


    have various examples in the forum..

Posting Permissions

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