[Users] select value of a combobox

Ralph Dell RDell at CatawbaCountyNC.gov
Fri May 28 17:00:17 CEST 2010


Actually the suggestion I sent was incomplete. 

listeners:{
		scope: this,
		'select': function(combo,record,index) {	
		//alert(combo.getValue());
		var size = combo.getValue();
}

Ralph Dell, GISP
GIS Dept.
Catawba County, NC


-----Original Message-----
From: users-bounces at geoext.org [mailto:users-bounces at geoext.org] On Behalf Of François Boussuges
Sent: Friday, May 28, 2010 10:05 AM
To: users at geoext.org
Subject: [Users] select value of a combobox

Hello

I have a WFS point and I display style okf this layers in function of 
diffferent attributes.
For display the style in function of my differents attributs I have 
create a combobox:

var medicago_store = new Ext.data.SimpleStore({
        fields:['value','text'],
        data: [
               ['SPIRALE_GOUSSE_HORAIRE', '% de spirale horaire'],
               ['SPIRALE_GOUSSE_ANTIHORAIRE', '% de spirale antihoraire']
               ]});
    var medicago_box = new Ext.form.ComboBox({
        store: medicago_store,
        displayField:'text',
        valueField: 'value',
        region: 'center',
        emptyText:'Selectionner une variable...',
        typeAhead: true,
        selectOnFocus:true,
        mode: 'local',
        width: 200,

        triggerAction: 'all'
       
I want to get the select value of the combobox for use this in a context 
variable like this:

var context = {
   
    fillColor: function(feature) {
        if(feature.cluster) {
        if ('/combobox.selectedvalue()' = 'value1/'){
            sens_hor= parseFloat(0)
            for(var c = 0; c < feature.cluster.length; c++)
            
sens_hor=sens_hor+parseFloat(feature.cluster[c].attributes.SPIRALE_GOUSSE_HORAIRE)
            result=sens_hor/feature.cluster.length
            if(result > 50) return "#990000";
            if(result<=50) return "#000099";}

But I have tried to extract the select value (or text ) of the combobox 
with no results?
Have you an ideas to insert this value in my function?
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list