I have try to display combo.getValue() ( medicago_box.getValue) in the 
label of my feature (it's my method to see if the return of the function 
is good) but in return I have an other function (I'm not on my working 
computer but I look it monday).
The store and the combobox are very simple but it's no easy to make 
this....I think the solution is just under my nose (It's a french 
expression).

François

Le 28/05/2010 17:00, Ralph Dell a écrit :
> 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: [email protected] [mailto:[email protected]] On Behalf Of 
> François Boussuges
> Sent: Friday, May 28, 2010 10:05 AM
> To: [email protected]
> 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
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>    

_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to