[Users] popup Field alias possible?

Robert Buckley robertdbuckley at yahoo.com
Wed Aug 17 10:02:04 CEST 2011


Hi

i have a popup which lists the attributes from my wfs layer in a PropertyGrid. 
This looks really great, but my Fieldnames are coded and have little meaning on 
first glance. I would like to assign aliases to the Fields and show them in the 
EditorGrid.

Has anyone done this, or does anyone have a workaround?


Yours,

Rob

<code>

var popup_wea
    layer_wea.events.on({
        featureselected: function (event) {
            var propsGrid = new Ext.grid.PropertyGrid({
                autoHeight: true,
                source: event.feature.attributes
            });
            propsGrid.getColumnModel().setColumnHeader(0, 'EIGENSCHAFT');
            propsGrid.getColumnModel().setColumnHeader(1, 'WERT');
           popup_wea = new GeoExt.Popup({
                id: 'popup_wea',
                title: "Informationen",
                feature: event.feature,
                collapsible: true,
                layout: "fit",
                autoHeight: true,
                panIn: true,
                width: 270,
                unpinnable: true,
                border: false,
                items: [propsGrid],
            listeners: {
               "close": function() {
                select.unselect(this.feature);
                            }
                        }
            });
// unselect feature when the popup is closed
        popup_wea.on({
            close: function() {
                if(OpenLayers.Util.indexOf(layer_wea.selectedFeatures, 
this.feature) > -1) {
                    select.unselect(this.feature);
                      }
            }
        });
            popup_wea.show();
        },
        featureunselected: function (event) {
            popup_wea.destroy();
        }
    });

</code>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110817/1fc02308/attachment.htm 


More information about the Users mailing list