Hybrid View

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Location
    Bangalore, India
    Posts
    13
    Vote Rating
    0
    nitinfuture is on a distinguished road

      0  

    Default Combobox Autocomplete default selection

    Combobox Autocomplete default selection


    Hi,
    I am using Autocomplete feature of GXT ComboBox. The problem I am facing is that it selects by default the first element from the resultant list, which I don't want. What I want is that it should retain the value whatever user has typed in the ComboBox and keep the list along with that like Google search Autocomplete does.

    Any help will be appreciated.

    -Nitin

  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


    The value the user has typed remains there. The user can just type more chars into it. onLoad if ComboBox is selecting the first entry in the dropdown. You will need to override ComboBox and remove that line.

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Location
    Bangalore, India
    Posts
    13
    Vote Rating
    0
    nitinfuture is on a distinguished road

      0  

    Default


    Thanks for your suggestion. I have seen the implementation of combobox and in the onLoad method it is selecting the element at zeroth index from the list in one scenario. so I will remove that piece of code while overriding and then try.

    One more thing I want to ask is that I have set the typeAhead to true. It is creating any problem with the selection from the list?

  4. #4
    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


    I am not aware of any problems with typeahead

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2012
    Location
    Germany
    Posts
    28
    Vote Rating
    -1
    wwab can only hope to improve

      0  

    Default


    I faced the same problem. Cause its bad design to override the whole class just to remove ONE line i tried to just subclass combobox(although thats bad design too, but less bad).

    Code:
            ComboBox<ModelData> combo = new ComboBox<ModelData>() {
                @Override
                protected void onLoad(StoreEvent<ModelData> se)
                {
                    super.onLoad(se);
                    getView().getSelectionModel().deselectAll();
                }
            };
    But that doesnt remove the highlighting on the first line -.-

    Abstraction is ok sometimes, but if I cant do nothing else than the default...

Similar Threads

  1. How do I make a default selection in ComboBox ?
    By arjun in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 17 Oct 2011, 1:31 PM
  2. ComboBox default selection
    By gaboo in forum Community Discussion
    Replies: 6
    Last Post: 18 Aug 2010, 11:05 PM
  3. How to get DataView of a comboBox to make a default selection
    By vishnupriya in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 1 Jan 2008, 11:26 AM

Thread Participants: 2

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