<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
Do you have FireBug installed for FireFox?<br>
The reason your layout is breaking is due to a JavaScript error:<br>
<br>
<span role="presentation" class="objectBox objectBox-errorMessage
hasBreakSwitch "></span><span class="errorMessage ">layer.map is
null</span><a title="layer.map.addControl(selectControl);"
class="errorSource a11yFocus "> <br>
at: layer.map.addControl(selectControl);
http://www.sfb806db.uni-koeln.de/irtg_webgis/libs/GeoExt/lib/GeoExt/widgets/grid/FeatureSelectionModel.js<br>
<br>
Your Sites layer has not been added to the map at this point, so
the map property is null.<span class="sourceRowText"
role="presentation"><br>
Try adding your </span></a><a
title="layer.map.addControl(selectControl);" class="errorSource
a11yFocus "><span class="sourceRowText" role="presentation">Sites
layer to the map before you create your grid panel as in the
GeoExt example. <br>
<br>
From the API documentation -
http://www.geoext.org/lib/GeoExt/widgets/grid/FeatureSelectionModel.html<br>
</span></a>
<dl class="describe">
<dt>
<tt class="descname">layer</tt></dt>
<dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer.Vector</span></tt>
The vector layer used for the creation of
the select feature control, it must already be added to the map.
If not
provided, the layer bound to the grid’s store, if any, will be
used.</dd>
</dl>
<a title="layer.map.addControl(selectControl);" class="errorSource
a11yFocus "><br>
<span class="sourceRowText" role="presentation"> Regards,<br>
<br>
<br>
Seth<br>
<br>
</span></a>On 20/01/2011 17:26, Christian Willmes wrote:
<blockquote cite="mid:4D386219.1030508@uni-koeln.de" type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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
<a class="moz-txt-link-freetext" href="http://geographika.co.uk">http://geographika.co.uk</a>
On 20/01/2011 13:50, Christian Willmes wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Christian,
Your sample site does not load in IE due to extra commas. Run your code
through <a class="moz-txt-link-freetext" href="http://www.jslint.com/">http://www.jslint.com/</a> to find where these are.
I've found breaking layouts in FF can often be caused by these.
Regards,
Seth
<a class="moz-txt-link-freetext" href="http://geographika.co.uk">http://geographika.co.uk</a>
On 20/01/2011 12:00, Christian Willmes wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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:
<a class="moz-txt-link-freetext" href="http://www.sfb806db.uni-koeln.de/irtg_webgis/app-sent-to-geoext.html">http://www.sfb806db.uni-koeln.de/irtg_webgis/app-sent-to-geoext.html</a>
(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! ;)):
<a class="moz-txt-link-freetext" href="http://www.sfb806db.uni-koeln.de/irtg_webgis/commented.png">http://www.sfb806db.uni-koeln.de/irtg_webgis/commented.png</a>
If I uncomment the "sm: new GeoExt.grid.FeatureSelectionModel()" it
breks the Layout see:
<a class="moz-txt-link-freetext" href="http://www.sfb806db.uni-koeln.de/irtg_webgis/uncommented.png">http://www.sfb806db.uni-koeln.de/irtg_webgis/uncommented.png</a>
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
</pre>
</blockquote>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>