<u></u>
<div bgcolor="#ffffff" text="#000000">
Hi, <br>
unfortunately, I have to bother you again.<small><font face="Courier
New, Courier, monospace"> OpenLayers.ProxyHost =
“cgi-bin/proxy.cgi?url=”</font></small> was already set from the
beginning. The application is in my Apache Document Root and the
store I use is the following: <br>
<small><font face="Courier New, Courier, monospace"><br>
var owsUrl = <a href="http://localhost:8080/geoserver/wfs" target="_blank">"http://localhost:8080/geoserver/wfs"</a>;</font></small><br>
<font face="Courier New, Courier, monospace"> <small>var store;<br>
Ext.onReady(function() { <br>
<br>
store = new GeoExt.data.WFSCapabilitiesStore({<br>
url: Ext.urlAppend(owsUrl,<br>
"SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities"),<br>
protocolOptions: {version: "1.1.0"},<br>
autoLoad: true,<br>
listeners: {<br>
load: initApp<br>
}<br>
});<br>
}); </small></font><br>
<br>
Still, the attribute columns are not read after the request was
sent. <br>
Concerning the print issue, ditching the curly braces or inserting a
proper layout name (one from the config.yaml, e.g. Letter, A4 etc.
doesn´t seem to work either. Do you have any other recommendations,
what it might be? <br>
<br>
Cheers,<br>
<br>
<br>
Philippe<br>
<br>
On 08.09.2011 16:41, Matt Priour wrote:
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:'Arial';color:rgb(0, 0, 0);font-size:10pt">
<div>proxy problem:</div>
<div>when using override-ext-ajax.js; set OpenLayers.ProxyHost
= “cgi-bin/proxy.cgi?url=” (assuming you application is
located in the localhost root directory)</div>
<div>configure the URL for the DescribeFeature store, etc
directly to the WFS (</div>
<div> ex: ‘<a href="http://localhost:8080/geoserver/wfs%E2%80%9D" target="_blank">http://localhost:8080/geoserver/wfs”</a> )</div>
<div> </div>
<div>Print problem:</div>
<div><font face="Courier New"><font style="font-size:12pt">>>var
printPage = new GeoExt.data.PrintPage({});</font></font></div>
<div><font face="Courier New" size="3">You should either ditch
the curly braces (“{}”) and let it use the defaults –OR-
put some actual configuration information (especially
‘layout’:<Some Valid Layout Name>) in the curly
braces.</font></div>
<div> </div>
<div style="font-family:'Arial';color:rgb(0, 0, 0);font-size:10pt">Matt Priour<br>
Kestrel Computer Consulting</div>
<div> </div>
<div style="font-style:normal;display:inline;font-family:'Calibri';color:rgb(0, 0, 0);font-size:small;font-weight:normal;text-decoration:none">
<div style="font:10pt tahoma">
<div> </div>
<div style="background:none repeat scroll 0% 0% rgb(245, 245, 245)">
<div><b>From:</b> <a title="philippe.rufin@googlemail.com" href="mailto:philippe.rufin@googlemail.com" target="_blank">Philippe
Rufin</a> </div>
<div><b>Sent:</b> Thursday, September 08, 2011 7:25 AM</div>
<div><b>To:</b> <a title="mpriour@kestrelcomputer.com" href="mailto:mpriour@kestrelcomputer.com" target="_blank">Matt
Priour</a> ; <a title="users@geoext.org" href="mailto:users@geoext.org" target="_blank">users@geoext.org</a>
</div>
<div><b>Subject:</b> Re: [Users] Tutorial /
Documentation for Query Panels in GeoExt?</div>
</div>
</div>
<div> </div>
</div>
<div style="font-style:normal;display:inline;font-family:'Calibri';color:rgb(0, 0, 0);font-size:small;font-weight:normal;text-decoration:none">
<div text="#000000" bgcolor="#ffffff">Hi Matt, <br>
<br>
thanks for the fast answer. I added the
override-ext-ajax.js, the requests are now send with the
URL parameter: <br>
<br>
<a href="http://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%2Fcgi-bin%2Fproxy.cgi%2Fwfs%3FVERSION%3D1.1.0%26REQUEST%3DDescribeFeatureType%26TYPENAME%3Dcases%26query%3D" target="_blank">http://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%2Fcgi-bin%2Fproxy.cgi%2Fwfs%3FVERSION%3D1.1.0%26REQUEST%3DDescribeFeatureType%26TYPENAME%3Dcases%26query%3D</a><br>
<br>
It seems, something´s still wrong since adding the js file
didn´t help making it work properly. The proxy.cgi URL is
now in it twice, how did that happen? How can I "add the
URL myself" here to just test? <br>
<br>
Considering the PrintProvider. I installed the required
files properly and the print() function works fine. For
adding the print function to my map panel, I used the
following code:<br>
<br>
<span style="font-family:courier new,monospace">var
mapPanel = new GeoExt.MapPanel({<br>
title: "Case Mapping",<br>
region: "center",<br>
viewConfig: {forceFit: true},<br>
width: 800,<br>
height: 400,<br>
map: map,<br>
layers: [nrw,sttl,lvr,inz,vecLayer],<br>
bbar: ["->", {<br>
text: "Print...",<br>
handler: function() { <br>
var printDialog = new
Ext.Window({<br>
items: [new
GeoExt.PrintMapPanel({<br>
sourceMap: mapPanel,<br>
printProvider: new
GeoExt.data.PrintProvider({<br>
method: "POST",
<br>
url:
"/geoserver/pdf", <br>
listeners: {<br>
"loadcapabilities": function() {<br>
var printPage =
new GeoExt.data.PrintPage({<br>
});<br>
<br>
printPage.fit(mapPanel, true);<br>
printProvider.print(mapPanel, printPage);<br>
}<br>
}<br>
})<br>
})],<br>
bbar: [{<br>
text: "Create PDF",<br>
handler: function()
{<br>
printDialog.items.get(0).</span><span style="font-family:courier new,monospace">print();<br>
}<br>
}]<br>
});<br>
printDialog.show();<br>
}<br>
}]<br>
});</span><br>
<br>
When using this, and trying the print button on the map
panel, the following error occurs: <br>
<br>
<span><span>this.printProvider.layout is null</span></span><br>
<span>var printSize =
this.printProvider.layout.get("size"); </span>(Line
240 in the PrintMapPanel.js)<br>
<br>
Is it any configuration regarding the size of the map
panel missing? I tried several settings but didn´t really
find out what it might be...<br>
<br>
Cheers, <br>
<br>
Philippe<br>
<br>
<br>
On 05.09.2011 18:15, Matt Priour wrote:
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:'Arial';color:rgb(0, 0, 0);font-size:10pt">
<div>1. You are missing the URL parameter in your
proxy request. it should be:</div>
<div>...proxy.cgi?url=<urlencoded full path to
service></div>
<div>for example:</div>
<div><a href="http://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs%3Fversion%3D1.1.0%26request%3DDescribeFeatureType%26typename%3Dcases" target="_blank">http://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs%3Fversion%3D1.1.0%26request%3DDescribeFeatureType%26typename%3Dcases</a>
</div>
<div> </div>
<div>This will be done automatically for you when
using OL methods with your OpenLayers.ProxyHost =
“proxy.cgi?url=”</div>
<div>This will also be handled automatically when
you are using this configuration and are using
GeoExt’s “override-ajax-ext.js” file which forces
all AJAX operations in ExtJS through the
OpenLayers.Request class</div>
<div>If you don’t want to use this file and want to
only primarily use GeoExt / ExtJS methods for
dynamically configuring the QueryPanel, then you
will have to add the url parameter yourself before
the request is actually made.</div>
<div> </div>
<div>2. Printing is chiefly done through the
Mapfish/Geoserver Print Module on the server side
with client side interface provided by
GeoExt.data.PrintProvider and its associated
classes</div>
<div><a href="http://www.mapfish.org/doc/print/" target="_blank"><font face="Times
New Roman"><font style="font-size:12pt">http://www.mapfish.org/doc/print/</font></font></a><font face="Times New Roman"><font style="font-size:12pt"> </font></font></div>
<div><a href="http://docs.geoserver.org/latest/en/user/community/printing/index.html" target="_blank"><font face="Times New Roman"><font style="font-size:12pt">http://docs.geoserver.org/latest/en/user/community/printing/index.html</font></font></a><font face="Times New Roman"><font style="font-size:12pt"> </font></font></div>
<div><a href="http://dev.geoext.org/docs/examples.html#print-preview-window" target="_blank"><font face="Times New Roman"><font style="font-size:12pt">http://dev.geoext.org/docs/examples.html#print-preview-window</font></font></a><font face="Times New Roman"><font style="font-size:12pt"> </font></font></div>
<div> </div>
<div>3. Exporting data as CSV can be done as a WFS
output format when using Geoserver.</div>
<div><a href="http://docs.geoserver.org/latest/en/user/services/wfs/outputformats.html" target="_blank"><font face="Times New Roman"><font style="font-size:12pt">http://docs.geoserver.org/latest/en/user/services/wfs/outputformats.html</font></font></a><font face="Times New Roman"><font style="font-size:12pt"> </font></font></div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>