PDA

View Full Version : [CLOSED] 'Dynamic' url for an AJAX proxy



Justin_Wignall
Jul 20, 2012, 5:51 PM
I have a tree store such as



<ext:TreeStore ID="storeTree" runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="AdditionalField" Type="String" />
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:AjaxProxy Url="~/BlankTree.ashx" />
</Proxy>
</ext:TreeStore>


and I'd like to be able to update the url of the AjaxProxy from code behind both from page initialisation and during direct methods/events.

Is this possible?

Daniil
Jul 20, 2012, 9:28 PM
Hi,

Initial page loading:

(store.Proxy[0] as AjaxProxy).Url = "new URL";

DirectEvent/DirectMethod:

store.Set("proxy.url", "new URL");

Justin_Wignall
Jul 21, 2012, 10:40 AM
Thanks Daniil, that works great.

Daniil
Nov 23, 2012, 12:57 PM
DirectEvent/DirectMethod:

store.Set("proxy.url", "new URL");

We have added the SetProxyUrl method.

this.Store1.SetProxyUrl("new");

It will be available in SVN soon.