1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Milan
    Posts
    15
    Vote Rating
    0
    Steve88 is on a distinguished road

      0  

    Default Text suggest facebook style

    Text suggest facebook style


    Hello to all!
    I implemented this ExtJS control, starting from an existing mootool's component http://www.devthought.com/projects/m...s/textboxlist/


    This control is not an extension of the combobox, but a simple textfield, so no store is assigned to the object.
    The data come from:
    - Ajax call;
    - Values;


    This is a basic version, I will try to add more features
    I know there is already a plugin that makes this (http://www.sencha.com/forum/showthre...549#post621549), but this type of control I needed for a particular project

    There is an example here:
    http://jsfiddle.net/steve88/jR7wT/

    Local suggest:
    Code:
    Ext.create("TextSuggest", {
     fieldLabel:            "Test",
     width:                600,
     labelWidth:            100,
     values:                [
                                {"id": 1, "value": "Test"},
                                {"id": 2, "value": "Test2"},
                                {"id": 3, "value": "Test3"}
                               ],
    config:                 {
                                 minLength:    2,
                                 valueField:    "Id",
                                 displayField: "Value"
                               }
    })

    Remote suggest:
    Code:
    Ext.create("TextSuggest", {
     fieldLabel:            "Test",
     width:                600,
     labelWidth:            100,
    config:                 {
                                 minLength:    2,
                                 queryRemote: true,
                                 valueField:    "Id",
                                 displayField: "Value",                             
                                 remote:    {
                                                              url:            "URL OF FILE"
                                                 }
                               }
    })
    Works with extjs version 4.1 or higher, I have not tested earlier versions

    I hope you enjoy it and that you need it.

    Steve
    Attached Files

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Very nice.. Thank you for the contribution.

    Scott

Thread Participants: 1

Tags for this Thread

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