Home Programming ExtJs Simple ExtJS drop down list

Simple ExtJS drop down list

E-mail Print
Share/Save/Bookmark
I've just spent almost two hours trying to get simple drop down list into my script. I would swear I've done it like it's done in an example on ExtJS page.

I was almost at the end of my nerves and I even considered to abandon ExtJs and go back to simple html where everything was much easier :)


Then ... like so many times before it "just started" to work !!!  :) Code that works is provided below.

var my_values = [
    ['one'],
    ['two'],
    ['three'],
    ['four'],
    ['five']
];
 
 
var numberField = new Ext.form.ComboBox({
    fieldLabel: 'Number',
    hiddenName: 'number',
    store: new Ext.data.SimpleStore({
        fields: ['number'],
        data : my_values 
    }),
    displayField: 'number',
    typeAhead: true,
    mode: 'local',
    triggerAction: 'all',
    emptyText:'Choose number...',
    selectOnFocus:true
});
Hits: 8341
Comments (3)Add Comment
June 26, 2009     
Ext JS? Does it aid in RAD ?
Cud you put your details code? Nothing much can be understood from here. ExtJs is complicated; The idea was to remove garbage raw javascript code and provide object oriented style coding. To do this, they have made it more complicated; the codes are more unreadable now, difficult to understand, not much ide supports are there... how can we reduce development code with libraries like yui, extjs, .. etc? I have also beginning to think: extjs suck!

Anywayz, cud you put your code online or, include some details about it e.g. like the full JS code and HTML ? (I'm new to extjs... a beginner like me will be highly de-motivated if he/she sees extjs sample demos/examples)
M Chisty | 203.219.219.52
July 20, 2009     
Thanks for sharing
Hi Miha, great job,
I was looking for this solution for a while.

Thanks,
Lilit
Lilit | 12.237.205.130
January 27, 2010     
Great thanks man :)
I've been using extJS for about a month now, and while I admit it complicates somethings it makes creating advanced/robust interfaces waaaay easier than coding by hand. I think extJS team has done an amazing job.

You should have seen the look on my managers face when I showed her what I had whipped togather in such a short time.

I'm still in awe of this amazing framework.

Cheers,
Alex
PCSpectra | 64.56.140.176

Write comment

busy
Last Updated ( Monday, 04 May 2009 20:26 )  

Sponsored Links

My friends

Bookingpoint
partner websites

Donate

Do you find content useful? Please donate so I can cover my hosting expenses! Thanks!