[Users] select value of a combobox
François Boussuges
f.boussuges at gmail.com
Fri May 28 16:05:08 CEST 2010
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?
More information about the Users
mailing list