[Users] how to create a dynamic combo from a postgis db

Robert Buckley robertdbuckley at yahoo.com
Wed Aug 24 13:03:01 CEST 2011


Hi,

I have up to now used a hand written combobox to set search paramters (code 
below)

it works fine, but needs to be manually updated if something changes.

Is there a simple way to dynamically fill the searchbox with values taken from 
the postgis db?

thanks,

Rob

<code>
items: [{xtype:'combo',
id:"textfield_combo",
                        store: new Ext.data.SimpleStore({
                            id: "0",
                                fields: ['abbr', 'action'],
                                data : [
['*', '*'],
['BS 1', 'BS 1'],
['GF 10', 'GF 10'],
['GF 12', 'GF 12'],
['GF 1a', 'GF 1a'],
['GF 2', 'GF 2'],
['GF 3', 'GF 3'],
['GF 4', 'GF 4'],
['GF 5', 'GF 5'],
['GF 7', 'GF 7'],
['GF 9', 'GF 9'],
['GS 2', 'GS 2'],
['GS 3', 'GS 3'],
['GS 4', 'GS 4'],
['GS A', 'GS A'],
['GS B', 'GS B'],
['GS C', 'GS C'],
['HE 1', 'HE 1'],
['HE 2', 'HE 2'],
['HE 4', 'HE 4'],
['HE 5', 'HE 5'],
['HE 9', 'HE 9'],
['HE B ehe-mals HE 6', 'HE B ehe-mals HE 6'],
['HE B ehe-mals HE 8', 'HE B ehe-mals HE 8'],
                                ['PE 1', 'PE 1'],
                                ['PE 2', 'PE 2'],
                                ['PE 3', 'PE 3'],
                                ['PE 4', 'PE 4'],
['PE 5', 'PE 5'],
['PE 6', 'PE 6'],
['PE 7', 'PE 7'],
['PE 8', 'PE 8'],
['PE 9', 'PE 9'],
['PE 10', 'PE 10'],
['PE 11', 'PE 11'],
['SZ 1', 'SZ 1'],
['SZ 2', 'SZ 2'],
['WF A', 'WF A'],
['WF D', 'WF D'],
['WF E', 'WF E'],
['WF F', 'WF F'],
['WF G', 'WF G'],
['WF 4', 'WF 4'],
['WF 5', 'WF 5'],
['WF 7', 'WF 7'],
['WF 10', 'WF 10'],
['WOB 1', 'WOB 1']
                                ]
                        }),
</code>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110824/7808be97/attachment.htm 


More information about the Users mailing list