[Users] WFS feature attributes do not show up in gridPanel
Frans Knibbe
frans at geodan.nl
Tue Jun 8 16:08:33 CEST 2010
Hello everybody,
Like some others, I am trying to recreate the 'WFS features in a
gridPanel' example that is described at
http://workshops.opengeo.org/geoext/wfs/index.html#geoext-wfs. It seems
I've almost got it working. The grid panel shows the right number of
records and the FID of each record. Also the map and the grid panel are
coupled; when I select a feature in one it is selected in the other. But
I can't get the ofeature attributes (other than FID) to display in the
gridPanel. Here is my store FatureStore and GridPanel definitions:
var store = new GeoExt.data.FeatureStore(
{
layer: wfs_no_gn
}
);
var gridPanel = new Ext.grid.GridPanel(
{
title: "Features"
,height: 140
,region: "south"
,viewConfig: {forceFit: true}
,collapsible: true
,collapseMode: "mini"
,store: store
,sm: new GeoExt.grid.FeatureSelectionModel()
,cm: new Ext.grid.ColumnModel(
{
defaults: {
sortable: true
}
,columns: [
{header: "ID", dataIndex: "fid"}
,{header: "Name", dataIndex:
"feature.attributes.text"}
,{header: "Language", dataIndex:
"feature.attributes.language"}
,{header: "Status", dataIndex:
"feature.attributes.nameStatus"}
,{header: "Nativeness", dataIndex:
"feature.attributes.nativeness"}
]
}
)
}
);
It seems I am missing an important bit of insight. Should I change
something in the data store? Or am I using a wrong dataIndex? I hope
someone can point me in the right direction.
Thanks in advance,
Frans
More information about the Users
mailing list