<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; 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: ‘http://localhost:8080/geoserver/wfs” )</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 size=3 face="Courier New">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><FONT size=3 face="Courier New"></FONT> </DIV>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 10pt">Matt
Priour<BR>Kestrel Computer Consulting</DIV>
<DIV> </DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT face=Arial></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title=philippe.rufin@googlemail.com
href="mailto:philippe.rufin@googlemail.com">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">Matt Priour</A> ; <A
title=users@geoext.org href="mailto:users@geoext.org">users@geoext.org</A>
</DIV>
<DIV><B>Subject:</B> Re: [Users] Tutorial / Documentation for Query Panels in
GeoExt?</DIV></DIV></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"><U></U>
<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></BODY></HTML>