<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>.hmmessage P {
        PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-FAMILY: Calibri; FONT-SIZE: 12pt
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.6001.19394"></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><SPAN class=625393500-03022013><FONT size=2 
face=Arial>Hi Gery,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=625393500-03022013><FONT size=2 
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=625393500-03022013><FONT size=2 
face=Arial>this is the way without GeoExt :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=625393500-03022013><PRE>myVectorLayer.refresh({url: newUrl});</PRE></SPAN></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial><A 
href="http://permalink.gmane.org/gmane.comp.gis.openlayers.user/16902">http://permalink.gmane.org/gmane.comp.gis.openlayers.user/16902</A></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2>A<SPAN 
class=625393500-03022013>rnd</SPAN></FONT></FONT><BR> </DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Gery 
.<BR><B>Gesendet:</B> Samstag, 2. Februar 2013 19:06<BR><B>An:</B> 
openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> [OpenLayers-Users] How can I 
overwrite the url ofOpenLayers.Protocol.HTTP?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr><FONT style="FONT-SIZE: 10pt" color=#366092 size=2 face=Arial>Hi 
all,<BR><BR>How can I overwrite the url of OpenLayers.Protocol.HTTP? I tried 
<BR><BR>> searchformPanel.protocol.url<BR><BR>and it works (checked with 
console.log), but at the end the original url is sent (in the code below: url: 
'/fs/') (see attached picture).<BR><BR>![output from firebug][1]<BR><BR>This is 
the code: <BR><BR>    var searchformPanel = new 
GeoExt.form.FormPanel({<BR>      border: 
false,<BR>      width: 
250,<BR>      protocol: new 
OpenLayers.Protocol.HTTP({<BR>        url: 
'/fs/',<BR>        format: new 
OpenLayers.Format.GeoJSON()<BR>      
}),<BR>      
items:[{<BR>        xtype: 
'combo',<BR>        id: 
'idcombo',<BR>        store: new 
Ext.data.SimpleStore({<BR>          
fields:['fsclass','ollayer'],<BR>          
data:[["Boreholes","Boreholes"],["All_layers","All 
layers"]]<BR>        
}),<BR>        displayField: 
'ollayer',<BR>        valueField: 
'fsclass',<BR>        fieldLabel: 
'Layer',<BR>        emptyText: 'select a 
layer',<BR>        submitValue: 
false,<BR>        selectOnFocus: 
true,<BR>        mode: 
'local',<BR>        typeAhead: 
true,<BR>        editable: 
false,<BR>        forceSelection: 
true,<BR>        triggerAction: 
'all'<BR>      
},{<BR>        xtype: 
'textfield',<BR>        id: 
'idtextfield',<BR>        fieldLabel: 'Find 
features',<BR>        emptyText: 'enter 
word',<BR>        name: 
'comments__like',<BR>        allowBlank: 
false<BR>      }],<BR>      
listeners:{<BR>        actioncomplete: 
function(form, 
action){<BR>          
searchShowTip(action.response.features);<BR>        
}<BR>      },<BR>      
buttons:[{<BR>        text: 
'search',<BR>        
listeners:{<BR>          click: 
function(){<BR><BR>            
var comboLayer = 
Ext.getCmp('idcombo').getRawValue();<BR>            
var keyword = 
Ext.getCmp('idtextfield').getRawValue();<BR><BR>            
var newUrl = '/fs/' + comboLayer + '?format=GeoJSON&comments__ilike=' + 
keyword + 
'&queryable=comments';<BR>            
console.log('1:' + 
newUrl);<BR><BR>            
//this gets '/fs/' from the 
searchformPanel<BR>            
console.log('2:' + 
searchformPanel.protocol.url);<BR><BR>            
searchformPanel.protocol.url = 
newUrl;<BR>            
console.log('3:' + 
searchformPanel.protocol.url);<BR><BR>            
searchformPanel.search();<BR>          
}<BR>        
}<BR>      }]<BR>  });<BR><BR>Please any support 
about this is very welcome, thank you!<BR><BR>  [1]: 
http://i.stack.imgur.com/mY1pq.png<BR id=FontBreak></FONT><BR><FONT 
style="FONT-SIZE: 10pt" color=#1f497d size=2 
face=Arial><BR>__________________________________________________________________________________________<BR>Piensa 
en el medio ambie<FONT face=Arial>nte - mantenlo en la pantalla. NO lo imprimas 
si NO es necesario.</FONT></FONT><FONT style="FONT-SIZE: 10pt" color=#1f497d 
size=2 face=Arial><BR></FONT><FONT style="FONT-SIZE: 10pt" color=#1f497d size=2 
face=Arial>Think green - keep it on the screen. Do NOT print if it is NOT 
necessary.</FONT><FONT style="FONT-SIZE: 10pt" color=#1f497d size=2 
face=Arial><BR></FONT><FONT style="FONT-SIZE: 10pt" color=#1f497d size=2 
face=Arial><SPAN id=ecxresult_box lang=de class=ecxshort_text><SPAN 
class=ecxhps>Denken Sie an</SPAN> <SPAN class=ecxhps>die 
Umwelt</SPAN></SPAN></FONT><FONT style="FONT-SIZE: 10pt" color=#1f497d size=2 
face=Arial><SPAN id=ecxresult_box lang=de><SPAN class=ecxhps></SPAN> <SPAN 
class=ecxhps>-</SPAN> <SPAN class=ecxhps>bewahren Sie es</SPAN> <SPAN 
class=ecxhps>auf dem Bildschirm.</SPAN> <SPAN class=ecxhps>Drucken Sie es 
NICHT</SPAN><SPAN>, wenn</SPAN> <SPAN class=ecxhps>es NICHT notwendig 
ist</SPAN><SPAN>.</SPAN></SPAN></FONT><BR></DIV></BODY></HTML>