[Users] "GeoExt.grid.FeatureSelectionModel()" destroys Layout

Matt Priour mpriour at kestrelcomputer.com
Thu Jan 20 17:51:38 CET 2011


I'm not sure why it is breaking your layout, other than the code is erroring 
out and not completing the layout.
To use the GeoExt.grid.FeatureSelectionModel, your grid panel MUST have a 
layer property.

Looking at the code below, I don't see any "layer"  property configured in 
your grid panel.

Matt Priour
Kestrel Computer Consulting

--------------------------------------------------
From: "Christian Willmes" <c.willmes at uni-koeln.de>
Sent: Thursday, January 20, 2011 10:26 AM
To: <users at geoext.org>
Subject: Re: [Users] "GeoExt.grid.FeatureSelectionModel()" destroys Layout

> Hi,
>
> I removed
> /sm: new GeoExt.grid.FeatureSelectionModel(), /
> from
> /var Store = new GeoExt.data.FeatureStore({ /
>
> and uncommented the sm in the grid. This breaks the layout (broken
> version now on the server).
>
> Does anyone have maybe a link to a similar app, where this
> GeoExt.grid.FeatureSelectionModel() is implemented sucsessfully (other
> than the feature-grid.html geoext example), from which I maybe could 
> learn?
>
> Thanks,
> Christian
>
> On 20.01.2011 15:55, geographika wrote:
>> Hi,
>>
>> I can't see anything in a brief look at the code.
>>
>> Your:
>>
>> /var Store = new GeoExt.data.FeatureStore({ /
>>
>> should not have a sm property:
>>
>> /sm: new GeoExt.grid.FeatureSelectionModel(), /
>>
>> The layout seems fine in IE and FF. Maybe uncomment the sm: in your grid
>> so we can see what is happening.
>>
>> Regards,
>>
>> Seth
>>
>> http://geographika.co.uk
>>
>> On 20/01/2011 13:50, Christian Willmes wrote:
>>> Hi Seth,
>>>
>>> thank you for the tip with JSLint. It seems to be a very useful tool. I
>>> cleaned up my code accordingly to the errors shown by JSLint.
>>> But that did not solved the problem with the
>>> GeoExt.grid.FeatureSelectionModel() breaking the layout.
>>>
>>> Any further tips/hints anyone?
>>>
>>> Thanks!
>>>
>>> Christian
>>>
>>> On 20.01.2011 12:09, geographika wrote:
>>>> Hi Christian,
>>>>
>>>> Your sample site does not load in IE due to extra commas. Run your code
>>>> through http://www.jslint.com/ to find where these are.
>>>> I've found breaking layouts in FF can often be caused by these.
>>>> Regards,
>>>>
>>>> Seth
>>>>
>>>> http://geographika.co.uk
>>>>
>>>> On 20/01/2011 12:00, Christian Willmes wrote:
>>>>> Hello,
>>>>>
>>>>> in the moment I try to connect a GeoExt.data.FeatureStore to a
>>>>> Ext.grid.GridPanel using GeoExt.grid.FeatureSelectionModel() for
>>>>> interaction.
>>>>>
>>>>> I am able to connect the FeatureStore to the GridPanel, but as soon
>>>>> as I
>>>>> add the FeatureSelectionModel, the complete PanelLayout is destroyed.
>>>>>
>>>>> This is the source of the GridPanel:
>>>>>
>>>>> var grid = new Ext.grid.GridPanel({
>>>>>     width: '100%',
>>>>>     height: 143,
>>>>>     viewConfig: {forceFit: true},
>>>>>     store: Store,
>>>>>     //sm: new GeoExt.grid.FeatureSelectionModel(),
>>>>>     cm: new Ext.grid.ColumnModel({
>>>>>         defaults: {
>>>>>             sortable: true
>>>>>         },
>>>>>         columns: [
>>>>>             {header: "Site", dataIndex: "site"},
>>>>>             {header: "Stage", dataIndex: "stage"},
>>>>>             {header: "Technocomplex", dataIndex: "technocomp"},
>>>>>             {header: "Method", dataIndex: "methode"},
>>>>>             {header: "Age (calbp)", dataIndex: "calbp"},
>>>>>             {header: "standard deviation", dataIndex: "std"},
>>>>>             {header: "Autor", dataIndex: "Autor"},
>>>>>             {header: "LabCode", dataIndex: "LabCode"}
>>>>>         ]
>>>>>     })
>>>>> });
>>>>>
>>>>> You can find the complete application here:
>>>>> http://www.sfb806db.uni-koeln.de/irtg_webgis/app-sent-to-geoext.html
>>>>> (if
>>>>> you may want to have a look at the complete source).
>>>>>
>>>>> If the "sm: new GeoExt.grid.FeatureSelectionModel()" is commented out,
>>>>> everything looks fine, see (The style rules for the data are just for
>>>>> testing at the moment! ;)):
>>>>>
>>>>> http://www.sfb806db.uni-koeln.de/irtg_webgis/commented.png
>>>>>
>>>>> If I uncomment the "sm: new GeoExt.grid.FeatureSelectionModel()" it
>>>>> breks the Layout see:
>>>>>
>>>>> http://www.sfb806db.uni-koeln.de/irtg_webgis/uncommented.png
>>>>>
>>>>> But I need to have the interaction between the Grid and the selected
>>>>> features on the map, any hint or advice to get this is very
>>>>> apreciatred!
>>>>>
>>>>> Thank you very much and best regards,
>>>>> Christian
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at geoext.org
>>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
> -- 
> Christian Willmes
> AG GIS & Fernerkundung      | GIS & RS Group
> Geographisches Institut     | Institute of Geography
> Universität zu Köln         | University of Cologne
> Tel.: +49 (0)221 470 6234
> Fax.: +49 (0)221 470 2280
> http://www.geographie.uni-koeln.de/gis
> http://www.sfb806.de
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
> 


More information about the Users mailing list