Hello,

Im trying todo the following thing, to override an existing http proxy in java script.

<ext:Store ID="ProductStore" AutoLoad="false" runat="server"> 
    <Proxy>
        <ext:HttpProxy Method="GET" Url="/UserControl/Product/GetProductIndexData/" />
    </Proxy>
    <Reader>
        <ext:JsonReader ReaderID="Id" Root="data" TotalProperty="totalCount">
            <Fields>
                <ext:RecordField Name="Id" />
                <ext:RecordField Name="Name" />
                <ext:RecordField Name="Active" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
This part of code is used in a partial view. In some cases i want to override the url.
<Proxy>

        <ext:HttpProxy Method="GET" Url="/UserControl/Product/GetProductIndexData/" />
</Proxy>
So i tried to make somekind of controller but the overriding part aint really working...

UCProductIndex =
    {
        loadProductIndexStoreOnProductGroupId: function(productGroupId) {
            UCProductIndex_Product_Store.load({ params: { ProductGroupId: productGroupId} });
        },

        loadStoreByProductenCollection: function(productCollectionId) 
        {
            urlCustom = '/UserControl/Product/GetByProductCollection';
            
            UCProductIndex_Product_Store.proxy = new Ext.data.HttpProxy(
                    {
                        url:urlCustom,
                        method:'GET',
                        api:
                            {
                                update:urlCustom,
                                //read:this.path+'/',
                                //create:this.path+'/',
                                //destroy:this.path
                            }
                    }
                );
            UCProductIndex_Product_Store.reload();
            UCProductIndex_Product_Store.load({ productCollectionId: productCollectionId });
        }
}
But this aint working :( Any ideas?


Regards Bas